20 行
689 B
Nginx Configuration File
20 行
689 B
Nginx Configuration File
events {}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
client_max_body_size 1024m;
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
|
|
# 入口 HTML/manifest 必须每次再验证;只有版本目录和历史迁移期的哈希 assets
|
|
# 可以永久缓存。外层 nginx 统一覆盖上游头,避免私有部署代理层重新引入旧入口。
|
|
map $uri $xuqm_web_cache_control {
|
|
default "no-cache, no-store, must-revalidate";
|
|
~^/(?:releases/[^/]+/assets|assets)/ "public, max-age=31536000, immutable";
|
|
~^/docs/(?:releases/[^/]+/assets|assets)/ "public, max-age=31536000, immutable";
|
|
}
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
}
|