[SAPUI5] Whitelist custom http headers on WebIDE
#tipoftheday will be a series of blog post that I’m mirroring from my Medium account.
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:
"headerWhiteList": [ "slug" ]
I just hope to have saved you some time and a big headache 😉
Surely it did save me from a big headache. Thanks...
Thanks Emanuele Ricci
It saved my lot of time..
Thank you once again.
Thanks Emanuele of 4 years ago!
This used to work for us when we were using SCP OData Provisioning to talk to an ECC6 backend (with IWBEP), but now we have switched to using an S/4HANA instance (still through OData Provisioning) it no longer works.
Is there anything additional that needs to be done on later versions?
Did you find any solution to this ?