Skip to content

Commit

Permalink
Add options to server
Browse files Browse the repository at this point in the history
  • Loading branch information
ytkimirti committed Sep 17, 2023
1 parent 4a1ea69 commit 3957285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const server = http.createServer((req, res) => {
res.writeHead(code, { "Access-Control-Allow-Origin": "*" });
res.end(body);
};

if (req.method === "POST") {
if (req.method === "OPTIONS") end(200);
else if (req.method === "POST") {
let requestBody = "";

req.on("data", (chunk) => {
Expand Down

0 comments on commit 3957285

Please sign in to comment.