Class: Rack::Protection::ReferrerPolicy
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Base
|
|
Instance Chain:
self,
Base
|
|
Inherits: |
Rack::Protection::Base
|
Defined in: | rack-protection/lib/rack/protection/referrer_policy.rb |
Overview
Prevented attack:: Secret leakage, third party tracking Supported browsers:: mixed support More infos:: https://www.w3.org/TR/referrer-policy/ https://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
Base
- Inherited
Class Method Summary
Base
- Inherited
Instance Attribute Summary
Instance Method Summary
Base
- Inherited
#accepts?, #call, #debug, #default_options, | |
#default_reaction | Alias for Base#deny. |
#deny, #drop_session, #encrypt, #html?, #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)
[ GitHub ]# File 'rack-protection/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