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"]
#
["accept", "accept-language", "content-language", "content-type", "origin"]
SAFELISTED_METHODS = ["GET", "POST", "HEAD"]
#
["GET", "POST", "HEAD"]
Class methods#
Methods#
#call(event : ART::Events::Response, dispatcher : AED::EventDispatcherInterface) : Nil
#
(event : ART::Events::Response, dispatcher : AED::EventDispatcherInterface) : Nil