enum Helmet::FrameGuardHandler::Origin

Overview

The Origin enum is used as an argument in the FrameGuardHandler constructor. You use it to specify the SAMEORIGIN or DENY headers values.

sameorigin = Helmet::FrameGuardHandler::Origin::Same
handler = Helmet::FrameGuardHandler.new allow_from: sameorigin

Defined in:

helmet/frameguardhandler.cr

Enum Members

Same = 0_u8

Corresponds to the SAMEORIGIN header value.

Nowhere = 1_u8

Corresponds to the DENY header value.

Instance Method Summary

Instance Method Detail

def nowhere? #

[View source]
def same? #

[View source]
def to_s #

Convert this Origin to a string. Origin::Same becomes "SAMEORIGIN" and Origin::Nowhere becomes "DENY".


[View source]