Commit 23cc5146 authored by Vadym Gidulian's avatar Vadym Gidulian

Fixed response for OPTIONS request

parent ebd80e0a
......@@ -21,7 +21,7 @@ app.use((req, res, next) => {
res.header('Access-Control-Allow-Methods', 'OPTIONS, HEAD, GET');
res.header('Access-Control-Expose-Headers', 'Content-Length');
if (req.method === 'OPTIONS') return res.send(204);
if (req.method === 'OPTIONS') return res.status(204).send();
next();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment