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
    – Max.A
    Mar 4 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.