class Rack::Protection::XSSHeader
- xss_mode
- How the browser should prevent the attack (default: :block)
Options:
Sets X-XSS-Protection header to tell the browser to block attacks.
More infos - blogs.msdn.com/b/ie/archive/2008/07/01/ie8-security-part-iv-the-xss-filter.aspx<br>Supported browsers
- Internet Explorer 8 and later
Prevented attack -
Non-permanent XSS
#
- Internet Explorer 8 and later
- How the browser should prevent the attack (default: :block)
def call(env)
def call(env) status, headers, body = @app.call(env) [status, header.merge(headers), body] end
def header
def header { 'X-XSS-Protection' => "1; mode=#{options[:xss_mode]}" } end