Skip to content

Commit f243bb3

Browse files
authored
Add CORS headers to microservice
1 parent 6aebd25 commit f243bb3

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)