class Kemal::Shield::ReferrerPolicy
- Kemal::Shield::ReferrerPolicy
- Kemal::Shield::Handler
- Kemal::Handler
- Reference
- Object
Overview
Kemal::Shield::ReferrerPolicy
is a handler that sets the Referrer-Policy HTTP header.
The default value is "no-referrer".
A custom Referrer-Policy policy can be set by setting
Kemal::Shield.config.referrer_policy
Example
Kemal::Shield.config.referrer_policy = ["same-origin", "origin", "strict-origin"]
This will set the Referrer-Policy policy to "same-origin,origin,strict-origin".
Valid policies:
"no-referrer"
"no-referrer-when-downgrade"
"same-origin"
"origin"
"strict-origin"
"origin-when-cross-origin"
"strict-origin-when-cross-origin"
"unsafe-url"