fix(nginx):embed iframe x-frame-options

This commit is contained in:
Krypt0n123
2026-07-02 00:17:59 +08:00
committed by lyingbug
parent 235e86b876
commit 929697618f
+12 -1
View File
@@ -45,6 +45,17 @@ server {
add_header X-Content-Type-Options "nosniff" always;
}
# Internal fallback target for /embed/* routes. Keep it separate from the
# main SPA location so embed pages do not inherit X-Frame-Options.
location = /embed.html {
internal;
root /usr/share/nginx/html;
add_header Cache-Control "no-cache, must-revalidate" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
}
# Embed widget pages may be loaded inside third-party iframes (lightweight embed.html)
location ^~ /embed/ {
root /usr/share/nginx/html;
@@ -121,4 +132,4 @@ server {
location = /50x.html {
root /usr/share/nginx/html;
}
}
}