Created
May 14, 2026 01:49
-
-
Save YellowOnion/bbb11ef8f5baf2fd9548cd94a9f566e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error_log logs/error.log; | |
| pid nginx.pid; | |
| daemon off; | |
| events {} | |
| http { | |
| access_log logs/access.log; | |
| server { | |
| listen 0.0.0.0:9998; | |
| listen [::0]:9998; | |
| location /login { | |
| proxy_pass http://localhost:8081/login; | |
| } | |
| location / { | |
| auth_request /auth; | |
| root ./; | |
| autoindex on; | |
| error_page 401 = @error401; | |
| } | |
| location @error401 { | |
| return 302 /login?returnTo=$scheme://$host$is_request_port$request_port$request_uri; | |
| } | |
| location /auth { | |
| internal; | |
| proxy_pass http://localhost:8081/auth; | |
| proxy_pass_request_body off; | |
| proxy_set_header Content-Length ""; | |
| proxy_set_header X-Original-URI $request_uri; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment