Skip to content

struct Athena::Routing::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 ART::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"] #

Class methods#

.subscribed_events : AED::SubscribedEvents #

View source

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

View source

Methods#