点击劫持漏洞修复方案:
在相应的 location 下添加
add_header X-Frame-Options SAMEORIGIN;
比如:
location ^~ /company_manager/ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header X-Frame-Options SAMEORIGIN;
proxy_pass http://serverCompanyManager;
}
location ^~ /idcard/ {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://serverIdcard;
}
来源:CSDN
作者:wudinaniya
链接:https://blog.csdn.net/wudinaniya/article/details/103928289