Add authserver module

This commit is contained in:
mac
2026-07-13 14:39:56 +08:00
parent 8b46d5c403
commit da51713159
37 changed files with 3852 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
server {
listen 80;
server_name _;
client_max_body_size 10m;
root /usr/share/nginx/html;
index index.html;
location = / {
return 302 /auth/;
}
location = /healthz {
proxy_pass http://authserver-backend:8083;
proxy_http_version 1.1;
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;
}
location = /readyz {
proxy_pass http://authserver-backend:8083;
proxy_http_version 1.1;
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;
}
location /auth/api/ {
proxy_pass http://authserver-backend:8083;
proxy_http_version 1.1;
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;
proxy_connect_timeout 5s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
location /auth/ {
try_files $uri $uri/ /auth/index.html;
}
location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?)$ {
expires 7d;
add_header Cache-Control "public, max-age=604800";
try_files $uri =404;
}
}