彻底解决360网站提示的漏洞

站点建设评论5.5K字数 435阅读1分27秒阅读模式

今天用360网站安全给自己的小站重新检测了下,99分

于是就查看了下漏洞的信息是轻微的X-Frame-Options头未设置文章源自亦枫博客-https://yflad.cn/763.html

彻底解决360网站提示的漏洞文章源自亦枫博客-https://yflad.cn/763.html

 文章源自亦枫博客-https://yflad.cn/763.html

解决的办法也很简单文章源自亦枫博客-https://yflad.cn/763.html

1、nginx,把下面这行添加到 ‘http’, ‘server’ 或者 ‘location’ 的配置中:文章源自亦枫博客-https://yflad.cn/763.html

  1. add_header X-Frame-Options SAMEORIGIN;

2、Apache,需要把下面这行添加到 ‘site’ 的配置中:文章源自亦枫博客-https://yflad.cn/763.html

  1. Header always append X-Frame-Options SAMEORIGIN

 文章源自亦枫博客-https://yflad.cn/763.html

关于发现Robots.txt文件文章源自亦枫博客-https://yflad.cn/763.html

可以设置成非搜索引擎禁止访问即可文章源自亦枫博客-https://yflad.cn/763.html

  1. location = /robots.txt {
  2.     if ($http_user_agent !~* "spider|bot|Python-urllib|pycurl") {
  3.         return 403;
  4.     }
  5. }

 文章源自亦枫博客-https://yflad.cn/763.html

因为我把360网站的认证给删除了,重新认证又因为HTTPS认证不成功。不过100分应该是跑不掉了的(嘿嘿)彻底解决360网站提示的漏洞文章源自亦枫博客-https://yflad.cn/763.html 文章源自亦枫博客-https://yflad.cn/763.html

历史上的今天
6月
12
扫扫关注公众号
weinxin
我的微信
扫扫体验小程序
weinxin
我的公众号
亦枫
  • 本文由 发表于 2017年6月12日 15:34:45
评论  0  访客  0
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定