Permalink
Browse files

adds OPTIONS method for cors

  • Loading branch information...
normanrz committed Dec 10, 2018
1 parent bbebf53 commit 3e7625837997bc213f03e02e4cb54831088e5cd4
Showing with 3 additions and 0 deletions.
  1. +3 −0 index.js
@@ -68,6 +68,9 @@ async function handler(req, res) {
} else {
return handleGET(req, res);
}
case "OPTIONS":
send(res, 200, "");
return;
default:
return send(res, 405, { error: "Only GET or POST allowed" });
}

0 comments on commit 3e76258

Please sign in to comment.