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 b966d2e commit d1e231f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Expand Up @@ -17,7 +17,7 @@ const app = express();
app.all('*', (req, res, next) => {
res.header("Access-Control-Allow-Origin", req.headers.origin || req.headers.referer || '*');
res.header("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Requested-With");
res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE");
res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS");
res.header("Access-Control-Allow-Credentials", true); //可以带cookies
res.header("X-Powered-By", 'Express');
next();
Expand Down

0 comments on commit d1e231f

Please sign in to comment.