rlm_rest: Add additional HTTP Header
Hi there The REST API we are using requires an additional HTTP header "API-Version: 2.0". The documention in modules-available/rest file says: Additional HTTP headers may be specified with `control.REST-HTTP-Header`. The only way I got it working was by putting these lines in the sites config: authorize { update control { &REST-HTTP-Header += "API-Version: 2.0" } } But then it's added to every request. It would be much nicer if I could add it to the module config, because it's module-specific. Is there a way to do this? Cheers Till
On Aug 9, 2021, at 1:56 PM, g4-lisz@tonarchiv.ch wrote:
The REST API we are using requires an additional HTTP header "API-Version: 2.0".
The documention in modules-available/rest file says: Additional HTTP headers may be specified with `control.REST-HTTP-Header`.
The only way I got it working was by putting these lines in the sites config:
authorize { update control { &REST-HTTP-Header += "API-Version: 2.0" } }
But then it's added to every request. It would be much nicer if I could add it to the module config, because it's module-specific. Is there a way to do this?
Unfortunately, no. But we are happy to accept patches to add this functionality. Alan DeKok.
On 09.08.21 21:28, Alan DeKok wrote:
On Aug 9, 2021, at 1:56 PM, g4-lisz@tonarchiv.ch wrote:
The REST API we are using requires an additional HTTP header "API-Version: 2.0".
The documention in modules-available/rest file says: Additional HTTP headers may be specified with `control.REST-HTTP-Header`.
The only way I got it working was by putting these lines in the sites config:
authorize { update control { &REST-HTTP-Header += "API-Version: 2.0" } }
But then it's added to every request. It would be much nicer if I could add it to the module config, because it's module-specific. Is there a way to do this? Unfortunately, no. But we are happy to accept patches to add this functionality.
Alan DeKok.
I see, thanks fpr your reply. Till
participants (2)
-
Alan DeKok -
g4-lisz@tonarchiv.ch