Class: Rack::Protection::ReferrerPolicy
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.5/lib/rack/protection/referrer_policy.rb
Overview
- 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’)
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#accepts?, #default_options, default_options, default_reaction, #deny, #drop_session, #encrypt, #html?, #initialize, #instrument, #origin, #random_string, #react, #referrer, #report, #safe?, #secure_compare, #session, #session?, #warn
Constructor Details
This class inherits a constructor from Rack::Protection::Base
Instance Method Details
#call(env) ⇒ Object
20 21 22 23 24 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rack-protection-3.0.5/lib/rack/protection/referrer_policy.rb', line 20 def call(env) status, headers, body = @app.call(env) headers['Referrer-Policy'] ||= [:referrer_policy] [status, headers, body] end |