feat: integrate platform backend and application interfaces
This commit is contained in:
+27
-4
@@ -8,6 +8,33 @@ server {
|
||||
return 301 /admin/;
|
||||
}
|
||||
|
||||
# The API/WS gateway is kept behind the same public origin. In local
|
||||
# compose it resolves to the `server` service; production can point this
|
||||
# upstream at the colocated gateway process.
|
||||
location /api/ {
|
||||
proxy_pass http://server:3100;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Request-Id $request_id;
|
||||
proxy_set_header Connection "";
|
||||
proxy_request_buffering on;
|
||||
client_max_body_size 10m;
|
||||
}
|
||||
|
||||
location /api/v1/ws/ {
|
||||
proxy_pass http://server:3100;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Request-Id $request_id;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_read_timeout 1h;
|
||||
proxy_send_timeout 1h;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location /admin/ {
|
||||
try_files $uri $uri/ /admin/index.html;
|
||||
}
|
||||
@@ -16,8 +43,4 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# 运行期配置由容器启动时生成,禁止缓存,确保改环境变量后即时生效。
|
||||
location = /config.js {
|
||||
add_header Cache-Control "no-store";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user