lambda-api icon indicating copy to clipboard operation
lambda-api copied to clipboard

CORS issues , preflight is working

Open guruprakashIT opened this issue 4 years ago • 0 comments

i tried all method , but still exist cors issue, in my case preflight connection working properly it returns 200 But actual response fail

here , my code is `const app = require("lambda-api")(); app.use((req, res, next) => { res.cors(); next(); }); app.get("/connect", async (req, res) => { return res.send({ status: "testing" }); });

app.options("/*", (req, res) => { res.cors(); return res.status(200).json({}); }); module.exports.connect = async (event, context) => { return await app.run(event, context); };`

@btakita thank you

guruprakashIT avatar Sep 22 '21 17:09 guruprakashIT