Closed zil1 closed 1 year ago
Hello, the auth_jwt
directive is parsed at config time and cannot be dynamically changed.
The auth_jwt $variable
value can be used to set a custom way to get the JWT, for example to get it from a cookie instead of the default Authentication
header: auth_jwt $cookie_MyCookieName;
It is not meant to be dynamically activable.
Why not let us use dynamic variables though?
EDIT: It works with njs variables:
js_set $jwt auth.findJWT;
auth_jwt $jwt;
Hi, I'm trying to configure the jwt check depending on the request method:
But I get a 401 response code with any request method