ruby-on-railsmime-typeslivereloadruby-on-rails-7x-content-type-options

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


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 ?


Solution

  • 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