20 Dec
2021
20 Dec
'21
10:44 a.m.
On Dec 18, 2021, at 9:35 AM, Michael Schwartzkopff <ms@sys4.de> wrote:
Is there a simple way to configure the rest module to generate this header or do I have to do something like:
update control {
REST-HTTP-Header := "Authorization: Token 0x123245678"
}
Just put that before every use of the "rest" module. Or, you can use policies and over-ride the rest module! Add a file raddb/policy.d/rest, with contents: rest.authorize { update control { REST-HTTP-Header := "Authorization: Token 0x123245678" } rest } Then every time you use just "rest" in the "authorize" section, the server will magically run that policy. It's very handy for this kind of situation. Alan DeKok.