Enables you to lock down services by using auth_request to allow users that are logged in to organizr to use the location.
Does not work great with APIs connecting to your service. Follow this guide for a write up on how to allow /api
.
Block Details | Supported | Notes |
---|---|---|
authentication | N/A | |
sub-directory | Yes | |
sub-domain | Yes | |
base URL | N/A | |
iFrame | N/A |
Expand for Code
location /auth-admin { rewrite ^ /auth.php?admin; } #You can ban users and IP's, check Documentation
location /auth-user { rewrite ^ /auth.php?user; } #You can ban users and IP's, check Documentation
It s easiest to include this file in all your subdomains.
Expand for Code
location = /auth-admin {
proxy_pass <fqdn>/auth-admin;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
}
location = /auth-user {
proxy_pass <fqdn>/auth-user;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
}