# 遺漏或不安全的 "X-Content-Type-Options" 標頭 # 遺漏或不安全的 "X-XSS-Protection" 標頭 修正: 配置伺服器利用 "nosniff" 值使用 "X-Content-Type-Options" 標頭 在tomcat上面 conf/web.xml新增下面的過濾器: ```\ <filter> <filter-name>httpHeaderSecurity</filter-name> <filter-class> org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class> <async-supported>true</async-supported> <init-param> <param-name>antiClickJackingOption</param-name> <param-value>SAMEORIGIN</param-value> </init-param> </filter> <filter-mapping> <filter-name>httpHeaderSecurity</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> ``` 也可以加在JAVA上面 [參考網站1](https://www.itread01.com/content/1542029106.html) [參考網站2](https://yu-jack.github.io/2017/10/20/secure-header/) [參考網站3](https://www.twblogs.net/a/5c84104dbd9eee35fc13d4bf) ###### tags: 弱點掃瞄