Whitelist custom http headers on WebIDE #sapui5 #tipoftheday
With the current project developed on HCP WebIDE we had to send custom http headers to our ABAP server to upload files.
In this case the custom http header was Slug. I’ve break my head for around 10 minutes to try to understand why that header was present in POST request (you can always check it easily from the Chrome Web Developer Console) but was not visible server side.
I tried to do the same request via Postman and everything was fine.
So the only possible reason was: that http header is not whitelisted!
The solution is pretty easy. You just need to edit your neo-app.json in your project’s root folder and add a new property to the root json like this:
I just hope to have saved you some time and a big headache ;)