On Hyperdrive::DSL::MainCORS options are passed in thorough #cors as a hash.
Keys are sanitized and set to a hash instance variable @config[:cors]@config provides one place for all configurations to live on the Hyperdrive::DSL::Main level.
On Hyperdrive::Middleware::CORS default CORS options are provided. Default values were based on https://github.com/britg/sinatra-cross_origin.
#format_options takes in options from the DSL level and formats keys and values to be valid CORS headers.
Implements CORS middleware/DSL.
On
Hyperdrive::DSL::Main
CORS
options are passed in thorough#cors
as a hash. Keys are sanitized and set to a hash instance variable@config[:cors]
@config
provides one place for all configurations to live on theHyperdrive::DSL::Main
level.On
Hyperdrive::Middleware::CORS
default CORS options are provided. Default values were based on https://github.com/britg/sinatra-cross_origin.#format_options
takes in options from the DSL level and formats keys and values to be valid CORS headers.