Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

enable cors on eleventy

// Enable CORS on 11ty > headers: {"Access-Control-Allow-Origin": "*"}
// Edit: eleventy.js:

module.exports = function(eleventyConfig) {
  eleventyConfig.setBrowserSyncConfig({
    middleware: function (req, res, next) {
        res.setHeader('Access-Control-Allow-Origin', '*');
        next();
      }
    });
};  

// References: https://medium.com/@matthewcrist/how-to-enable-cors-in-browsersync-6389e911764b
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript how to give variable names inside for loop corresponding to value of iterator javascript 
Javascript :: complete date 
Javascript :: add backgorund image in react native app 
Javascript :: https://discord.com/api/guilds/845154482256871435/widget.json 
Javascript :: how to auto click webpage in angular 
Javascript :: javascript zoom to meters 
Javascript :: symbols with object.assign 
Javascript :: get all youtube playlist videos as json without api python 
Javascript :: TemplateSyntaxError at /cart/ 
Javascript :: modulo operator multiples, alternate values 
Javascript :: create react app runtime env 
Javascript :: signalwire instaall in node 
Javascript :: liquid indicators in react native 
Javascript :: how to create a mixed array in javascript 
Javascript :: URIError 
Javascript :: how to turn off auto refresh a href in javascript 
Javascript :: google auto complete not show on modal 
Javascript :: get index after pushing value in array in js 
Javascript :: get search value from reacr route2 
Javascript :: clima 
Javascript :: mongoose remove more than 1 item 
Javascript :: Unable to load schema from https json SchemaStore org eslintrc 
Javascript :: graphql Int cannot represent non-integer value 
Javascript :: encrypt & decrypt api data in localstorage 
Javascript :: custom hook for unique items in react 
Javascript :: instantiation javascript 
Javascript :: buffering_seeking_time_ranges 
Javascript :: negate expression prolog 
Javascript :: replace function javascript recurrent 
Javascript :: javascript date now format yyyy-mm-dd hh24 mi ss 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =