fix(reboot): harden public maintenance fallback
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 58s
CD Pipeline / build-and-deploy (push) Successful in 4m27s
CD Pipeline / post-deploy-checks (push) Successful in 1m44s
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 58s
CD Pipeline / build-and-deploy (push) Successful in 4m27s
CD Pipeline / post-deploy-checks (push) Successful in 1m44s
This commit is contained in:
@@ -99,6 +99,8 @@ server {
|
||||
# 標準 REST API
|
||||
location /api/ {
|
||||
proxy_pass http://awoooi_api;
|
||||
proxy_intercept_errors on;
|
||||
error_page 502 503 504 =503 /__awoooi-maintenance.html;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
@@ -114,6 +116,8 @@ server {
|
||||
# /api/v1/agent/thinking - AI 思考過程串流
|
||||
location ~ ^/api/v1/(dashboard/stream|agent/thinking) {
|
||||
proxy_pass http://awoooi_api;
|
||||
proxy_intercept_errors on;
|
||||
error_page 502 503 504 =503 /__awoooi-maintenance.html;
|
||||
|
||||
# SSE 必要設定: 禁用緩衝
|
||||
proxy_buffering off;
|
||||
@@ -138,6 +142,8 @@ server {
|
||||
# -------------------------------------------------------------------------
|
||||
location /api/v1/ws {
|
||||
proxy_pass http://awoooi_api;
|
||||
proxy_intercept_errors on;
|
||||
error_page 502 503 504 =503 /__awoooi-maintenance.html;
|
||||
|
||||
# WebSocket 升級
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
@@ -153,6 +159,8 @@ server {
|
||||
# =========================================================================
|
||||
location / {
|
||||
proxy_pass http://awoooi_web;
|
||||
proxy_intercept_errors on;
|
||||
error_page 502 503 504 =503 /__awoooi-maintenance.html;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
@@ -166,6 +174,8 @@ server {
|
||||
# -------------------------------------------------------------------------
|
||||
location /_next/static/ {
|
||||
proxy_pass http://awoooi_web;
|
||||
proxy_intercept_errors on;
|
||||
error_page 502 503 504 =503 /__awoooi-maintenance.html;
|
||||
proxy_cache_valid 200 365d;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
@@ -182,7 +192,7 @@ server {
|
||||
# =========================================================================
|
||||
# Public maintenance fallback
|
||||
# =========================================================================
|
||||
error_page 502 503 504 /__awoooi-maintenance.html;
|
||||
error_page 502 503 504 =503 /__awoooi-maintenance.html;
|
||||
location = /__awoooi-maintenance.html {
|
||||
internal;
|
||||
root /var/www/maintenance;
|
||||
|
||||
Reference in New Issue
Block a user