1

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 app\etc\env.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?

1 Answer 1

1

you can change the livereload host via the Grunt configuration.

Try this

'system' => [ 'default' => [ 'design' => [ 'footer' => [ 'absolute_footer' => '<script src="<%= watch.options.livereload %>"></script>' ] ] ]] 
1
  • That's not Grunt, that's app\etc\env.php Commented Mar 4, 2023 at 15:23

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.