Skip to content

Commit

Permalink
Merge pull request #17 from juandjara/patch-1
Browse files Browse the repository at this point in the history
Add CORS headers to microservice
  • Loading branch information
mxstbr authored Jan 12, 2017
2 parents 6aebd25 + 9c7e326 commit 5ea0c93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { pushView } = require('./utils')

module.exports = async function (req, res) {
const { pathname, query } = url.parse(req.url, /* parseQueryString */ true)
res.setHeader('Access-Control-Allow-Origin', '*')
// Send all views down if "?all" is true
if (String(query.all) === 'true') {
const data = {
Expand Down

0 comments on commit 5ea0c93

Please sign in to comment.