class Kemal::Shield::CrossOriginResourcePolicy

Overview

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"

Defined in:

kemal-shield/handlers/cross_origin_resource_policy.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(policy : String = "same-origin") #

[View source]

Instance Method Detail

def call(context) #

[View source]