Fix authenticated City Analysis queries
This commit is contained in:
@@ -37,6 +37,12 @@ server {
|
||||
|
||||
include /etc/nginx/snippets/weathertool-authelia-location.conf;
|
||||
|
||||
location /api/ {
|
||||
include /etc/nginx/snippets/weathertool-proxy.conf;
|
||||
include /etc/nginx/snippets/weathertool-authelia-api-authrequest.conf;
|
||||
proxy_pass http://127.0.0.1:8002;
|
||||
}
|
||||
|
||||
location / {
|
||||
include /etc/nginx/snippets/weathertool-proxy.conf;
|
||||
include /etc/nginx/snippets/weathertool-authelia-authrequest.conf;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
auth_request /internal/authelia/authz;
|
||||
|
||||
auth_request_set $user $upstream_http_remote_user;
|
||||
auth_request_set $groups $upstream_http_remote_groups;
|
||||
auth_request_set $name $upstream_http_remote_name;
|
||||
auth_request_set $email $upstream_http_remote_email;
|
||||
|
||||
proxy_set_header Remote-User $user;
|
||||
proxy_set_header Remote-Groups $groups;
|
||||
proxy_set_header Remote-Name $name;
|
||||
proxy_set_header Remote-Email $email;
|
||||
|
||||
# API clients must receive the original 401 response. Redirecting an XHR/fetch
|
||||
# request to auth.laikapstak.li turns it into a cross-origin request which the
|
||||
# browser blocks as CORS and leaves the application waiting for data.
|
||||
Reference in New Issue
Block a user