Skip to content

Instantly share code, notes, and snippets.

@levenokk
Created June 24, 2020 17:11
Show Gist options
  • Save levenokk/9bf2aafab25918b56cea1d3b30443bcd to your computer and use it in GitHub Desktop.
Save levenokk/9bf2aafab25918b56cea1d3b30443bcd to your computer and use it in GitHub Desktop.
let allowCrossDomain = function(req, res, next) {
res.header('Access-Control-Allow-Origin', "*");
res.header('Access-Control-Allow-Headers', "*");
next();
}
app.use(allowCrossDomain); // чтобы все могли обращаться
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment