Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active December 20, 2020 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/698093453d8a4e14a4e0932407bc6ee1 to your computer and use it in GitHub Desktop.
Save parzibyte/698093453d8a4e14a4e0932407bc6ee1 to your computer and use it in GitHub Desktop.
app.use((req, res, next) => {
res.set("Access-Control-Allow-Credentials", "true");
res.set("Access-Control-Allow-Origin", "http://tu_dominio.com");
res.set("Access-Control-Allow-Headers", "Content-Type");
res.set("Access-Control-Allow-Methods", "OPTIONS,GET,PUT,POST,DELETE");
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment