开发者

X-Frame-Options header missing (Nginx Config)

So, i'm already added X-Frame-Options in nginx config below :

location /api/ {
    proxy_pass http://127.0.0.1:8181/secure/;
    add_header X-Frame-Options "DENY";
}

but when i check from header response in network, the X-Frame-Options not showing at all.

X-Frame-Options header missing (Nginx Config)

if customed the random header key, like

X-Frame-Optionszzz "DEN开发者_C百科Y";

The header response showing correctly as the key and value.

X-Frame-Options header missing (Nginx Config)

Why nginx look like blocking my X-Frame-Options header?


Why do you want to set X-Frame-Options? When frame-ancestors is set in your Content-Security-Policy all modern browsers will ignore X-Frame-Options anyway. This could be the reason why nginx removes the header and doesn't remove custom headers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜