authelia - choose portal or auth basic mode
This commit is contained in:
parent
a385183d88
commit
c4aef1d606
@ -21,7 +21,6 @@ proxy_set_header Remote-User $user;
|
|||||||
proxy_set_header Remote-Groups $groups;
|
proxy_set_header Remote-Groups $groups;
|
||||||
proxy_set_header Remote-Name $name;
|
proxy_set_header Remote-Name $name;
|
||||||
proxy_set_header Remote-Email $email;
|
proxy_set_header Remote-Email $email;
|
||||||
# If Authelia returns 401, then nginx redirects the user to the login portal.
|
{% if AUTHELIA_MODE == "portal" %}
|
||||||
# If it returns 200, then the request pass through to the backend.
|
|
||||||
# For other type of errors, nginx will handle them as usual.
|
|
||||||
error_page 401 =302 {{ AUTHELIA_BACKEND }}/?rd=$target_url;
|
error_page 401 =302 {{ AUTHELIA_BACKEND }}/?rd=$target_url;
|
||||||
|
{% endif %}
|
||||||
|
|||||||
@ -903,6 +903,12 @@ Default value :
|
|||||||
Context : *global*, *multisite*
|
Context : *global*, *multisite*
|
||||||
The private Authelia address when doing requests from nginx (e.g. : http://my-authelia.local:9091).
|
The private Authelia address when doing requests from nginx (e.g. : http://my-authelia.local:9091).
|
||||||
|
|
||||||
|
`AUTHELIA_MODE`
|
||||||
|
Values : *portal* | *auth-basic*
|
||||||
|
Default value : *portal*
|
||||||
|
Context : *global*, *multisite*
|
||||||
|
Choose authentication mode : show a web page (`portal`) or a simple auth basic prompt (`auth-basic`).
|
||||||
|
|
||||||
## misc
|
## misc
|
||||||
|
|
||||||
`SWARM_MODE`
|
`SWARM_MODE`
|
||||||
|
|||||||
@ -87,6 +87,15 @@
|
|||||||
"label": "Address of the authelia upstream",
|
"label": "Address of the authelia upstream",
|
||||||
"regex": ".*",
|
"regex": ".*",
|
||||||
"type": "text"
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "multisite",
|
||||||
|
"default": "portal",
|
||||||
|
"env": "AUTHELIA_MODE",
|
||||||
|
"id": "authelia-mode",
|
||||||
|
"label": "Show the portal or simply auth basic prompt",
|
||||||
|
"regex": "^(portal|auth\\-basic)$",
|
||||||
|
"type": "text"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user