I'm using Google API Gateway (available in beta) for my service. Facing an issue with the API Requests which have API Headers with underscore (_
) in it's name e.g CUSTOM_HEADER_NAME. The API Gateway throws 400, Bad Request
for such requests.
The APIs work fine when the custom headers have hyphen (-
) instead on underscore, e.g CUSTOM-HEADER-NAME.
It looks be to a configuration issue on the web server used by the API Gateway which is forbidding headers with underscores - Why do HTTP servers forbid underscores in HTTP header names
Since I don't have control over Google API Gateway's web server, is there a workaround to mitigate this issue and allow headers with underscores.
Note: The service is a legacy application being moved to GCP. So I don't really have the option to update the header formats as it would mean updating all the clients using this API.