class Rack::Protection::ReferrerPolicy
- Prevented attack
-
Secret leakage, third party tracking
- Supported browsers
-
mixed support
- More infos
-
www.w3.org/TR/referrer-policy/ caniuse.com/#search=referrer-policy
Sets Referrer-Policy header to tell the browser to limit the Referer header.
Options:
- referrer_policy
-
The policy to use (default: ‘strict-origin-when-cross-origin’)
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/protection/referrer_policy.rb, line 20 def call(env) status, headers, body = @app.call(env) headers['Referrer-Policy'] ||= options[:referrer_policy] [status, headers, body] end