On a Reactive (Web or mobile) I want to add a custom dynamic HTTP header every time the device interacts with the server. (Aggregate, data refresh, Server Action or any other resource).
Things I have tried:
1) JavaScript override of XMLHttpRequest.send to include the header - It works for POST but not for a normal GET
2) Add a service worker to intercept requests and add the header - It works but... Found out later that OutSystems already uses a service worker under the wood and you can't have 2.
Hi Francisco,
You can try to add the custom HTTP header by using factory configuration. Below is the documentation
https://www.outsystems.com/forums/discussion/44851/how-to-add-custom-response-headers-manipule-web-config-for-cases-like-cors/
Hope this will help.
Best Regards
Devendra
Hi Devendra,We want to send it as a Request HTTP Header, so this factory configuration solution isn't possibleThe objective is for a proxy server catch that request to the server before process itThanks for your ReplyGreetings,Pedro Vieira
*Under the hood - in my defense it was already quite late...
Devendra: Factory Configuration is for Response Headers as Pedro is saying. Thanks anyway.
Hi
Yes I think you would need some kind of javascript hack to add custom header to each server request.
Hello Francisco Silva and Pedro Vieira,
Have you found any solution for the described issue?
Best regards,
Rui Gomes