豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 622 Bytes

File metadata and controls

12 lines (9 loc) · 622 Bytes

X-Xss-Protection is set to 0 by default

Version 6 and below of secure_headers set the X-Xss-Protection to 1; mode=block by default. This was done to protect against reflected XSS attacks. However, this header is no longer recommended (see #439 for more information).

If any functionality in your app depended on this header being set to the previous value, you will need to set it explicitly in your configuration.

# config/initializers/secure_headers.rb
SecureHeaders::Configuration.default do |config|
  config.x_xss_protection = "1; mode=block"
end