Skip to content

Commit 5ea0c93

Browse files
authored
Merge pull request #17 from juandjara/patch-1
Add CORS headers to microservice
2 parents 6aebd25 + 9c7e326 commit 5ea0c93

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const { pushView } = require('./utils')
66

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

0 commit comments

Comments
 (0)