class

Kemal::Shield::CrossOriginResourcePolicy

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

Kemal::Shield::CrossOriginResourcePolicy is a handler that sets the Cross-Origin-Resource-Policy HTTP header.

Default value is "same-origin".

A custom Cross-Origin-Resource-Policy policy can be set by setting

Kemal::Shield.config.corp

Valid policies

"same-origin"
"same-site"
"cross-origin"

Constructors

new(policy : String = "same-origin")
Source

Instance methods

call(context)
Source