diff options
| author | Arseney300 <Arseney300@gmail.com> | 2026-03-04 09:28:37 +0700 |
|---|---|---|
| committer | Arseney300 <Arseney300@gmail.com> | 2026-03-04 09:28:37 +0700 |
| commit | 13d4673fc9c7a67af19171a6745a808f97fc6741 (patch) | |
| tree | 25d062c30d80a97b1eb753a87f428c0a3839ef87 /nginx | |
| parent | 24ce3335f9aef46f5d9cff412e09b7d4c20bba44 (diff) | |
Remove Authelia gate from Nexus and Docker registry
Nexus and registry.swave.lol now bypass Authelia entirely — Nexus
handles its own authentication for both the web UI and Docker clients.
auth_request removed from all nexus/registry nginx locations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'nginx')
| -rw-r--r-- | nginx/nginx.conf | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 7ac081c..181a4cc 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -132,10 +132,8 @@ server { return 301 https://jenkins.swave.lol/$1; } - # Nexus via path prefix on main domain + # Nexus — no auth_request, Nexus handles its own authentication location /nexus { - auth_request /_authelia-auth; - auth_request_set $authelia_user $upstream_http_remote_user; proxy_pass http://nexus:8081/nexus; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -401,36 +399,14 @@ server { return 302 https://$host/nexus/; } + # No auth_request — Nexus handles its own authentication location /nexus { - auth_request /_authelia-auth; - auth_request_set $authelia_user $upstream_http_remote_user; proxy_pass http://nexus:8081/nexus; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } - - # Authelia forward-auth subrequest endpoint - location = /_authelia-auth { - internal; - resolver 127.0.0.11 valid=30s; - set $authelia_upstream http://authelia:9091/api/verify; - proxy_pass $authelia_upstream; - proxy_pass_request_body off; - proxy_set_header Content-Length ""; - proxy_set_header X-Original-URL $scheme://$http_host$request_uri; - proxy_set_header X-Forwarded-Method $request_method; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header X-Forwarded-Uri $request_uri; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - - error_page 401 = @authelia_login_redirect; - location @authelia_login_redirect { - return 302 https://auth.swave.lol/?rd=$scheme://$http_host$request_uri; - } } # Docker Registry — registry.swave.lol @@ -466,9 +442,8 @@ server { client_max_body_size 2G; chunked_transfer_encoding on; + # No auth_request — Nexus handles Docker Basic Auth directly location / { - auth_request /_authelia-auth; - auth_request_set $authelia_user $upstream_http_remote_user; proxy_pass http://nexus:5000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -476,22 +451,6 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - # Authelia forward-auth subrequest endpoint - location = /_authelia-auth { - internal; - resolver 127.0.0.11 valid=30s; - set $authelia_upstream http://authelia:9091/api/verify; - proxy_pass $authelia_upstream; - proxy_pass_request_body off; - proxy_set_header Content-Length ""; - proxy_set_header X-Original-URL $scheme://$http_host$request_uri; - proxy_set_header X-Forwarded-Method $request_method; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header X-Forwarded-Uri $request_uri; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - error_page 401 = @authelia_login_redirect; location @authelia_login_redirect { return 302 https://auth.swave.lol/?rd=$scheme://$http_host$request_uri; |
