Skip to content

Instantly share code, notes, and snippets.

@chernysh2909
Created August 28, 2019 09:23
Show Gist options
  • Save chernysh2909/6bb5b089c2cb6f8dcb7185f383c30107 to your computer and use it in GitHub Desktop.
Save chernysh2909/6bb5b089c2cb6f8dcb7185f383c30107 to your computer and use it in GitHub Desktop.
disable CORS express js
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment