Add warning when a Published REST service has a parameter type Header with an underscore - Mendix Forum

Add warning when a Published REST service has a parameter type Header with an underscore

4

A Mendix published REST service operation can have multiple parameter types; Query, Path, Body, Header, Form. The parameter type determines where in the REST message the parameter is expected. This parameter can be mapped to a Microflow parameter (e.g. a string) and used in the microflow for further processing.

 

In our implementation we were expecting an ‘api_key’ in the HTTP Header and would check in the microflow if it matched a valid API key. Which works fine locally but these Header values get dropped once deployed to the Mendix cloud (or any other NGINX web server).

 

The NGINX web servers in the Mendix cloud are not configured to allow underscores in headers. These key:values are silently dropped ( which are perfectly valid according to the HTTP standard), the least Mendix Studio Pro should do in this case is show a warning for that header parameter indicating it might gets dropped if it contains underscores.

 

Read more: Missing (disappearing) HTTP Headers in a published REST service

asked
0 answers