You're viewing **Apigee Edge** documentation.  
[Go to the
**Apigee X** documentation](http://cloud.google.com/apigee/docs/api-platform/reference/endpoint-properties-reference). info

> [!NOTE]
> **Note:** This document is applicable for Edge Private Cloud users only.


In the client-server communication, a server responds back with HTTP status code `405
Method Not Allowed` if the
[HTTP request method](https://datatracker.ietf.org/doc/html/rfc7231#section-4) presented by the client is known to the server
but is not supported by the target resource. Similarly in Apigee Edge, the backend server can
respond back with the HTTP status code `405 Method Not Allowed.`


Apigee Edge expects the backend server to send `405 Method Not Allowed` responses
with the list of allowed methods in the `Allow` header, as per specification
[RFC 7231, section 6.5.5: 405 Method Not Allowed](https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.5).


The `Allow` header must be sent in the following format:

```
Allow: HTTP_METHODS
```


For example, if your backend server allows `GET`, `POST` and
`HEAD` methods, you need to ensure that the `Allow` header contains them
as follows:

```
Allow: GET, POST, HEAD
```


If the backend server does not send the `Allow` header with the HTTP status code
`405 Method Not Allowed,` then Apigee returns HTTP status code `502 Bad
Gateway` with error code `protocol.http.Response405WithoutAllowHeader `to the
client application. The ***recommended solution*** to address this error is
to fix the backend server to adhere to the specification
[RFC 7231, section 6.5.5: 405 Method Not Allowed](https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.5) or use the fault handling to
respond back with HTTP status code `405 Method Not Allowed` including the
`Allow` header as explained in the troubleshooting playbook
[502 Bad Gateway - Response 405 without Allow header](https://docs.apigee.com/api-platform/troubleshoot/runtime/502-bad-gateway-response-405-without-allow-header).


However, in some exceptional cases, it may not be possible to fix your backend or modify your
API Proxy to address this issue immediately.


In such cases, you can set the ignore allow header for the `405` property
`HTTP.ignore.allow_header.for.405` at the
Message Processor level temporarily. Setting this property to `true` prevents Apigee
from returning the `502 Bad Gateway` response to client applications even if the
backend server sends HTTP status code `405 Method Not Allowed` without the
`Allow` header.


Once you are in a position to fix your backend server to send HTTP status code `405 Method
Not Allowed` with the `Allow` header, you can revert the property
`HTTP.ignore.allow_header.for.405` to its default value `false`.

> [!NOTE]
> **Note:** Since setting the property `HTTP.ignore.allow_header.for.405` to `true` at the Message Processor level is not a recommended solution, it is advised to use this solution only if you have ascertained that you are unable to use the recommended solutions to solve the error `502 Bad Gateway` with error code `protocol.http.Response405WithoutAllowHeader` described in [502 Bad Gateway - response 405 without Allow header](https://docs.apigee.com/api-platform/troubleshoot/runtime/502-bad-gateway-response-405-without-allow-header).

## Before you begin


Before you use the steps in this document, be sure you understand the following topics:

- Read the Playbook - [502 Bad Gateway - response 405 without Allow header](https://docs.apigee.com/api-platform/troubleshoot/runtime/502-bad-gateway-response-405-without-allow-header).
- If you aren't familiar with configuring properties for Edge on Private Cloud, read [How to configure Edge](https://docs.apigee.com/private-cloud/latest/how-configure-edge).

## Configuring ignore allow header for 405 property to true on Message Processors


In Apigee Edge, the property `HTTP.ignore.allow_header.for.405` is set to
`false`, by default. This enables Apigee Edge to return the `502 Bad
Gateway` with error code `protocol.http.Response405WithoutAllowHeader` to the
client applications if the backend server sends HTTP status code `405 Method Not
Allowed` without the `Allow` header. If you want to prevent Apigee Edge from
sending `502 Bad Gateway` to client applications, then you need to set the value of
the property `HTTP.ignore.allow_header.for.405` to `true`on the Message
Processors.


This section explains how to configure the property
`HTTP.ignore.allow_header.for.405` to `true` on the
Message Processors, using the token as per the syntax described in
[How to configure Edge](https://docs.apigee.com/private-cloud/latest/how-configure-edge).

> [!NOTE]
> **Note:** If you modify the property `HTTP.ignore.allow_header.for.405` to `true` at the Message Processor level, then it is important to note that it affects all the API proxies associated with the organizations and environments served by the specific Message Processors.

1. On the Message Processor machine, open the following file in an editor. If it does not
   already exist, then create it.

   ```
   /opt/apigee/customer/application/message-processor.properties
   ```


   For example, to open the file using [vi](https://en.wikipedia.org/wiki/Vi), enter the following:

   ```
   vi /opt/apigee/customer/application/message-processor.properties
   ```
2. Add a line in the following format to the properties file:

   ```
   conf_http_HTTP.ignore.allow_header.for.405=true
   ```
3. Save your changes.
4. Ensure the properties file is owned by the `apigee` user as shown below:

   ```
   chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
   ```
5. Restart the Message Processor as shown below:

   ```
   /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart
   ```
6. If you have more than one Message Processor, repeat the above steps on all the Message Processors.

## Verifying ignore allow header for 405 property is set to true on Message Processors


This section explains how to verify that the property
`HTTP.ignore.allow_header.for.405` has been successfully updated to `true`
on the Message Processors.


Even though you use the token `conf_http_HTTP.ignore.allow_header.for.405` to update
the value of the property on the Message Processor, you need to verify if the actual property
`HTTP.ignore.allow_header.for.405` has been set to `true`.

1. On the Message Processor machine, search for the property `HTTP.ignore.allow_header.for.405` in the `/opt/apigee/edge-message-processor/conf` directory and check to see if it has been set to `true` as shown below:

   ```
   grep -ri "HTTP.ignore.allow_header.for.405" /opt/apigee/edge-message-processor/conf
   ```
2. If the property is successfully updated on the Message Processor, then the above command should show the value of the property `HTTP.ignore.allow_header.for.405` as `true` in the `http.properties` file as shown below:

   ```
   /opt/apigee/edge-message-processor/conf/http.properties:HTTP.ignore.allow_header.for.405=true
   ```
3. If you still see the value for the property `HTTP.ignore.allow_header.for.405` as `false` then verify that you have followed all the steps outlined in [Configuring ignore allow header for 405 property to true in
   Message Processors](https://docs.apigee.com/how-to-guides/configuring-ignore-allow-header-for-405-property-in-message-processors#configure-ignore-allow-true) correctly. If you have missed any step, repeat all the steps again correctly.
4. If you are still not able to modify the property `HTTP.ignore.allow_header.for.405`, then contact [Apigee Edge Support](https://docs.apigee.com/api-platform/troubleshoot/support).

## Configuring ignore allow header for 405 property to false on Message Processors


This section explains how to configure the property
`HTTP.ignore.allow_header.for.405` to its default value**`false`** on the Message Processor, using the token as per the syntax described in
[How to configure Edge](https://docs.apigee.com/private-cloud/latest/how-configure-edge).

1. Verify if the property `HTTP.ignore.allow_header.for.405` is modified to `true`. You can do this by searching for this property in the `/opt/apigee/edge-message-processor/conf` directory and checking its value using the following command:

   ```
   grep -ri "HTTP.ignore.allow_header.for.405" /opt/apigee/edge-message-processor/conf
   ```
2. If the property is set to `true` on the Message Processor, then the above command should show the value of the property `HTTP.ignore.allow_header.for.405` as `true` in the `http.properties` file as shown below:

   ```
   /opt/apigee/edge-message-processor/conf/http.properties:HTTP.ignore.allow_header.for.405=true
   ```
3. If the above command shows that the property `HTTP.ignore.allow_header.for.405` is set to `false` (default value), then you don't have to do anything else. That is, skip the following steps.
4. If the property `HTTP.ignore.allow_header.for.405` is set to `true`, then perform the following steps to revert to its default value `false`.
5. On the Message Processor machine, open the following file in an editor:

   ```
   /opt/apigee/customer/application/message-processor.properties
   ```

   For example, to open the file using [vi](https://en.wikipedia.org/wiki/Vi), enter the following:

   ```
   vi /opt/apigee/customer/application/message-processor.properties
   ```
6. Remove the following line from the properties file:

   ```
   conf_http_HTTP.ignore.allow_header.for.405=true
   ```
7. Save your changes.
8. Ensure the properties file is owned by the `apigee` user as shown below:

   ```
   chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
   ```
9. Restart the Message Processor as shown below:

   ```
   /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart
   ```
10. If you have more than one Message Processor, repeat the above steps on all the Message Processors.

## Verifying ignore allow header for 405 property is set to false on Message Processors

This section explains how to verify that the property
`HTTP.ignore.allow_header.for.405` has been successfully updated to `false`
on the Message Processors.

Even though you use the token
`conf_http_HTTP.ignore.allow_header.for.405` to update the value on the Message
Processor, you need to verify if the actual property `HTTP.ignore.allow_header.for.405`
has been set to `false`.

1. On the Message Processor machine, search for the property `HTTP.ignore.allow_header.for.405` in the `/opt/apigee/edge-message-
   processor/conf` directory and check to see if it has been set to `false` as shown below:

   ```
   grep -ri "HTTP.ignore.allow_header.for.405" /opt/apigee/edge-message-processor/conf
   ```
2. If the property is successfully updated on the Message Processor, then the above command should show the value of the property `HTTP.ignore.allow_header.for.405` as `false` in the `http.properties` file as shown below:

   ```
   /opt/apigee/edge-message-processor/conf/http.properties:HTTP.ignore.allow_header.for.405=false
   ```
3. If you still see the value for the property `HTTP.ignore.allow_header.for.405` as `true`, then verify that you have followed all the steps outlined in [Configuring ignore allow header for 405 property to false on Message Processors](https://docs.apigee.com/how-to-guides/configuring-ignore-allow-header-for-405-property-in-message-processors#configure-ignore-allow-false) correctly. If you have missed any step, repeat all the steps again correctly.
4. If you are still not able to modify the property `HTTP.ignore.allow_header.for.405`, then contact [Apigee Edge Support](https://docs.apigee.com/api-platform/troubleshoot/support).