123456789_123456789_123456789_123456789_123456789_

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

DEFAULT_OPTIONS

Class Method Summary

Instance Attribute Summary

Base - Inherited

Instance Method Summary

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'] ||= options[:referrer_policy]
  [status, headers, body]
end