Skip to content

Change livereload host

The default livereload host is 127.0.0.1, but I have the access problems to access the this host directly in WSL2. Need to change it to http://localhost:35729/livereload.js Found the solution to change it via appetcenv.php – to add

system' => [
        'default' => [
            'design' => [
                'footer' => [
                    'absolute_footer' => '<script src="http://localhost:35729/livereload.js"></script>'
                ]
            ]
        ]
    ]

but got Refused to load the script ‘http://localhost:35729/livereload.js’ because it violates the following Content Security Policy directive error

Disabled Magent0_Csp, working well, console is clear

Is there some elegant method just to change livereload host via grunt config. hostname: ‘localhost’ in watch.js config doeasn’t work?