Skip to content

Commit

Permalink
add a Access-Control-Allow-Origin header
Browse files Browse the repository at this point in the history
  • Loading branch information
Fábio Santos committed Oct 14, 2014
1 parent 1c72743 commit 3dd6767
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fakeDir.js
Expand Up @@ -70,6 +70,7 @@ function findOp(req, operations) {

function respondWith(fakeDir, res, absPath) {
res.setHeader('Content-Type', fakeDir.contentType)
res.setHeader('Access-Control-Allow-Origin', '*')
fs.readFile(absPath, function (err, data) {
if (err) {
// Error could be that the user is looking at a dir.
Expand Down

0 comments on commit 3dd6767

Please sign in to comment.