class

Kemal::Shield::XPermittedCrossDomainPolicies

Inherits Kemal::Shield::Handler / Kemal::Handler / Kemal::HandlerInterface / HTTP::Handler / Reference / Object

Kemal::Shield::XPermittedCrossDomainPolicies is a handler that sets the X-Permitted-Cross-Domain-Policies HTTP header.

X-Permitted-Cross-Domain-Policies specifies your domain's policies for loading cross-domain content.

This handler sets the X-Permitted-Cross-Domain-Policies header to "none" by default.

Valid options for this header:

"none"
"master-only"
"by-content-type"
"all"

The X-Permitted-Cross-Domain-Polices header can be updated by changing the value of:

Kemal::Shield.config.x_permitted_cross_domain_policies

This handler can be turned off by setting

Kemal::Shield.config.x_permitted_cross_domain_policies_on = false

Constructors

new(policy : String = "none")
Source

Instance methods

call(context)
Source
valid_policy?(policy : String)
Source