Module roadrunner_cors

Behaviours: roadrunner_middleware.

Data Types

config()

config() = #{origins := origins(), methods => [binary()], headers => [binary()] | reflect, expose => [binary()], credentials => boolean(), max_age => non_neg_integer()}

origins()

origins() = any | [binary()] | fun((binary()) -> boolean())

state()

state() = #cors{origins = origins(), credentials = boolean(), reflect_headers = boolean(), preflight_static = roadrunner_http:headers(), actual_static = roadrunner_http:headers()}

Function Index

call/3
init/1

Function Details

call/3

call(Req::roadrunner_req:request(), Next::roadrunner_middleware:next(), Cors::state()) -> roadrunner_handler:result()

init/1

init(Config::config()) -> state()


Generated by EDoc