Is your feature request related to a problem? Please describe.
When configuring nginx to use auth_request with nginx the tinyauth domain needs to be hardcoded in the return 302 redirect location. authelia does this differently: while it violates standards they send a Location redirect as part of the 401 response to nginx. This allows nginx to pass it back to the client, this simplifies the required nginx config:
auth_request_set $redirection_url $upstream_http_location;
error_page 401 =302 $redirection_url;
Describe the solution you'd like
pass a Location or a X-Tinyauth-Location header as part of the 401 auth_request reponse which then can be used to redirect the client.
Describe alternatives you've considered
keep everything like it is now or redircet the client to the nginx tinyauth location which then further redirects it to tinyauth (like done by authentik/oauth2proxy)
Additional context
ZoeyVid/NPMplus#3046 (comment)
Is your feature request related to a problem? Please describe.
When configuring nginx to use auth_request with nginx the tinyauth domain needs to be hardcoded in the return 302 redirect location. authelia does this differently: while it violates standards they send a Location redirect as part of the 401 response to nginx. This allows nginx to pass it back to the client, this simplifies the required nginx config:
Describe the solution you'd like
pass a Location or a X-Tinyauth-Location header as part of the 401 auth_request reponse which then can be used to redirect the client.
Describe alternatives you've considered
keep everything like it is now or redircet the client to the nginx tinyauth location which then further redirects it to tinyauth (like done by authentik/oauth2proxy)
Additional context
ZoeyVid/NPMplus#3046 (comment)