authelia - choose portal or auth basic mode

This commit is contained in:
bunkerity
2021-06-29 20:32:15 +02:00
parent a385183d88
commit c4aef1d606
3 changed files with 17 additions and 3 deletions

View File

@@ -21,7 +21,6 @@ proxy_set_header Remote-User $user;
proxy_set_header Remote-Groups $groups;
proxy_set_header Remote-Name $name;
proxy_set_header Remote-Email $email;
# If Authelia returns 401, then nginx redirects the user to the login portal.
# If it returns 200, then the request pass through to the backend.
# For other type of errors, nginx will handle them as usual.
{% if AUTHELIA_MODE == "portal" %}
error_page 401 =302 {{ AUTHELIA_BACKEND }}/?rd=$target_url;
{% endif %}