lambda-api
lambda-api copied to clipboard
CORS issues , preflight is working
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