<-- Back

HTTP Header parameter empty for REST Published Service

Issue

HTTP Header parameters of a REST Published Service with underscores in their names, for instance api_key, become empty when the application runs in the Mendix Cloud. Although it works running locally.

When debugging the REST call, can be seeing the following error message:

TRACE - REST Publish: The request does not have a 'api_key' header, using default value: empty

Environment

Mendix Cloud

Cause

This happens because the Mendix applications deployed on the Mendix Cloud are running on a NGINX web server and in our servers the setting underscores_in_headers is not enabled.

Solution/Workaround

The user can rename the header replacing the underscores _ with hyphens - .

For example, api_key becomes api-key.

Internal information related

  • 217147
  • CUUNVHS9M/p1715857499598729

Additional information 

Nginx

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.