class Cors::Handler
- Cors::Handler
- Reference
- Object
Overview
TODO Handle wildcard origins (*.example.com) in configuration
Included Modules
- HTTP::Handler
Defined in:
handler.crConstant Summary
-
ALLOWED_HEADERS_DEFAULT =
["origin", "accept", "content-type", "x-requested-with"]
-
ALLOWED_METHODS_DEFAULT =
["GET", "POST", "PUT"]
-
Log =
::Log.for("cors")
-
VARY_HEADERS =
["Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers"]
Constructors
Instance Method Summary
Constructor Detail
def self.new(respond_ok : Proc(HTTP::Server::Context, Nil), max_age : Int32 = 0, allow_credentials : Bool = false, allowed_origins : Array(String) = [] of String, allowed_methods : Array(String) = [] of String, allowed_headers : Array(String) = [] of String, exposed_headers : Array(String) = [] of String)
#