init
This commit is contained in:
+10
-15
@@ -18,23 +18,8 @@ http {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
# ===== 移除冲突的 X-Frame-Options,改用 CSP =====
|
||||
# 删除以下两行:
|
||||
# proxy_hide_header X-Frame-Options;
|
||||
# add_header X-Frame-Options SAMEORIGIN always;
|
||||
|
||||
# 使用 CSP frame-ancestors 替代(更灵活、现代)
|
||||
# 配置说明:
|
||||
# - 'self':允许同源页面嵌入
|
||||
# - https://your-trusted-domain.com:允许特定域名嵌入(替换成你的实际域名)
|
||||
# - 多个域名用空格分隔
|
||||
add_header Content-Security-Policy "frame-ancestors 'self' https://www.airzhihui.com https://www.rszhihui.com;" always;
|
||||
|
||||
# 如果完全不需要被任何页面嵌入,使用:
|
||||
# add_header Content-Security-Policy "frame-ancestors 'none';" always;
|
||||
|
||||
# 如果允许任何域名嵌入(不推荐,安全风险):
|
||||
# add_header Content-Security-Policy "frame-ancestors *;" always;
|
||||
|
||||
# ========== aircrawl 反向代理 ==========
|
||||
# 无斜杠时重定向到带斜杠
|
||||
@@ -100,4 +85,14 @@ http {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 1025;
|
||||
server_name _;
|
||||
root /usr/share/nginx/suanfa;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user