Skip to content

Commit

Permalink
test options
Browse files Browse the repository at this point in the history
  • Loading branch information
bailicangdu committed Nov 25, 2018
1 parent 94fe615 commit a0fb108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ app.all('*', (req, res, next) => {
res.header("Access-Control-Allow-Credentials", true); //可以带cookies
res.header("X-Powered-By", 'Express');
if (req.method == 'OPTIONS') {
return
res.sendStatus(200);
} else {
next();
}

0 comments on commit a0fb108

Please sign in to comment.