Skip to content

Commit

Permalink
Added Cache-Control in CORs allowed headers
Browse files Browse the repository at this point in the history
Some library set this header to avoid caching, but the browser will deny the COR request with `Request header field Cache-Control is not allowed by Access-Control-Allow-Headers in preflight response.`
  • Loading branch information
sebastien-roch authored Jun 27, 2017
1 parent 7c6ec06 commit 84fc997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function authenticate(code, cb) {
app.all('*', function (req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Methods', 'GET, OPTIONS');
res.header('Access-Control-Allow-Headers', 'Content-Type');
res.header('Access-Control-Allow-Headers', 'Content-Type, Cache-Control');
next();
});

Expand Down

0 comments on commit 84fc997

Please sign in to comment.