Skip to content

Instantly share code, notes, and snippets.

Yuki Ito mururu

Block or report user

Report or block mururu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mururu / ca_cowboy_middleware.erl
Last active Mar 28, 2018 — forked from sebmaynard/ca_cowboy_middleware.erl
[For Cowboy 2.0] A Cowboy middleware to set some CORS headers for every request, and to handle OPTIONS requests without needing to implement them in every handler.
View ca_cowboy_middleware.erl
execute(Req, Env) ->
{ok, ReqWithCorsHeaders} = set_cors_headers(Req),
Method = cowboy_req:method(ReqWithCorsHeaders),
You can’t perform that action at this time.