-
-
Save JamesTryand/da18d8a5854edd48b055 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Allowing CORS (Cross-Origin Resource Sharing) requests from | |
// grunt server, put this into Gruntfile.js | |
grunt.initConfig({ | |
connect: { | |
livereload: { | |
options: { | |
port: 9000, | |
hostname: 'localhost', | |
middleware: function (connect) { | |
return [ | |
function(req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Allow-Methods', '*'); | |
next(); | |
}, | |
]; | |
} | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment