Permalink
Browse files

change header method to set

  • Loading branch information...
Jordan Harrell Jordan Harrell
Jordan Harrell authored and Jordan Harrell committed Dec 2, 2019
1 parent 1799a20 commit ed05bec82eaaa0048beb694ea7c2f017e9934879
Showing with 2 additions and 2 deletions.
  1. +2 −2 app.js
4 app.js
@@ -8,8 +8,8 @@ const index = require("./routes/index.js");

const app = express();
app.use(function (req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
res.set("Access-Control-Allow-Origin", "*");
res.set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
app.use(index);

0 comments on commit ed05bec

Please sign in to comment.