grace/dots
dotfiles/nix configs
git clone https://git.gae.moe/grace/dots
b70d9f9
main
1{ } : 2 3let 4authLocation = endpoint :{ 5proxyPass = "http://127.0.0.1:9091/api/authz/ ${ endpoint } " ; 6recommendedProxySettings = false ; 7extraConfig = '' 8internal; 9auth_request off; 10proxy_pass_request_body off; 11proxy_set_header Content-Length ""; 12proxy_set_header Connection ""; 13proxy_set_header X-Original-URL $scheme://$host$request_uri; 14proxy_set_header X-Original-Method $request_method; 15proxy_set_header X-Forwarded-For $remote_addr; 16proxy_set_header Cookie $http_cookie; 17proxy_set_header Authorization $http_authorization; 18'' ; 19}; 20in 21{ 22locations = { 23"= /_authelia" = authLocation "auth-request" ; 24"= /_authelia_git" = authLocation "git" ; 25}; 26 27browser = '' 28auth_request /_authelia; 29auth_request_set $auth_redirect $upstream_http_location; 30error_page 401 =302 $auth_redirect; 31auth_request_set $auth_user $upstream_http_remote_user; 32auth_request_set $auth_groups $upstream_http_remote_groups; 33auth_request_set $auth_email $upstream_http_remote_email; 34auth_request_set $auth_name $upstream_http_remote_name; 35proxy_set_header Remote-User $auth_user; 36proxy_set_header Remote-Groups $auth_groups; 37proxy_set_header Remote-Email $auth_email; 38proxy_set_header Remote-Name $auth_name; 39'' ; 40 41git = '' 42auth_request /_authelia_git; 43proxy_set_header Authorization ""; 44'' ; 45}