Skip to content

Commit

Permalink
Only apply CORS middleware to JSON API endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
nylen committed Jul 25, 2016
1 parent c1ce6ff commit e482663
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ require('./lib/db').connect((err, db) => {
});
});

app.use(cors());
app.use(config.http.basePath || '/', apiRouter);
app.use(config.http.basePath || '/', cors(), apiRouter);

server.listen(config.http.port, () => {
console.log('Listening for requests on :' + config.http.port);
Expand Down

0 comments on commit e482663

Please sign in to comment.