class Kemal::Shield::CrossOriginOpenerPolicy

Overview

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

Default value is "same-origin".

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

Kemal::Shield.config.coop

Valid policies

"same-origin"
"same-origin-allow-popups"
"unsafe-none"

Defined in:

kemal-shield/handlers/cross_origin_opener_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]