Permalink
Browse files
adds OPTIONS method for cors
- Loading branch information...
Showing
with
3 additions
and
0 deletions.
-
+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