Created
March 20, 2015 08:53
-
-
Save tonydieu/4df749b6c2576c7813b3 to your computer and use it in GitHub Desktop.
How-to: Enable CORS in Browsersync
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
// https://hondo.wtf/2015/02/15/enable-cors-in-browsersync | |
gulp.task('browser-sync', function () { | |
browserSync({ | |
notify: false, | |
port: 6543, | |
server: { | |
baseDir: config.dest, | |
middleware: function (req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
next(); | |
} | |
} | |
}); | |
}); |
not working
not working
not working
not working
not working
not working
not working
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not working.