livereload rails 7 and incorrect (X-Content-Type-Options: nosniff)

217 Views Asked by At

I use gems :

gem 'guard'
gem 'guard-livereload', require: false
gem 'rack-livereload'
gem 'rb-fsevent',       require: false

and execute bundle exec guard like in Rails 6 (there is no problem) but with my rails 7 app, I have an error when I save CSS and trying relaod it :

Resource at 'http://localhost:3000/seances' was blocked due to incorrect MIME type ('text/html') incorrect (X-Content-Type-Options: nosniff).

All my css are remove, but new css is not apply.

How can I solve this ?

2

There are 2 best solutions below

0
On BEST ANSWER

Looks like this is sometimes a problem with the default dev rails configuration of config.assets.digest, try setting it to false in config/development.rb

config.assets.digest = false

Source: https://github.com/guard/guard-livereload/issues/193

1
On

Make sure the your web server which is serving up your css resource includes the correct mime type in the Content-type header (should be text/css, not text/html)