Skip to content

struct Athena::Framework::Listeners::CORS
inherits Struct #

Handles Cross-Origin Resource Sharing (CORS).

Handles CORS preflight OPTIONS requests as well as adding CORS headers to each response. See ATH::Config::CORS for information on configuring the listener.

Included modules

Athena::EventDispatcher::EventListenerInterface

Constants#

SAFELISTED_HEADERS = ["accept", "accept-language", "content-language", "content-type", "origin"] #

SAFELISTED_METHODS = ["GET", "POST", "HEAD"] #

Constructors#

.new(config : ATH::Config::CORS?) #

View source

Class methods#

.subscribed_events #

View source

Methods#