1// Enable CORS on 11ty > headers: {"Access-Control-Allow-Origin": "*"}
2// Edit: eleventy.js:
3
4module.exports = function(eleventyConfig) {
5 eleventyConfig.setBrowserSyncConfig({
6 middleware: function (req, res, next) {
7 res.setHeader('Access-Control-Allow-Origin', '*');
8 next();
9 }
10 });
11};
12
13// References: https://medium.com/@matthewcrist/how-to-enable-cors-in-browsersync-6389e911764b