Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/cors.js

Created Jun 11, 2020
Embed
What would you like to do?
app.use((req, res, next) => {
res.set("Access-Control-Allow-Credentials", "true");
res.set("Access-Control-Allow-Origin", DOMINIO_PERMITIDO_CORS);
res.set("Access-Control-Allow-Headers", "Content-Type");
res.set("Access-Control-Allow-Methods", "DELETE");
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment