Commit 03dddd55 by zhangxingmin

push

parent 0480ece5
...@@ -11,6 +11,14 @@ server { ...@@ -11,6 +11,14 @@ server {
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
location ~ \.mjs$ {
root /usr/share/nginx/html;
default_type application/javascript; # 设置默认 MIME 类型
add_header 'Access-Control-Allow-Origin' '*';
expires 1y;
add_header Cache-Control "public, immutable";
}
# 静态资源处理 - 必须放在最前面 # 静态资源处理 - 必须放在最前面
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|map)$ { location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|map)$ {
# ✅ 关键:添加 try_files 指令 # ✅ 关键:添加 try_files 指令
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment