How to use the Browser Guard in Rails Discussion
If you're building a no build Rails application that makes use of modern browser features (like ONCE Campfire!), you'll definitely want to use this.
There is one trap to take care for: If your are using https://pagespeed.web.dev/ (Googles SEO tool) - you will get a -406 not acceptable - error. Looks like the pagespeed crawler is not recognized.
That's probably a bug in the UserAgent bot check I would imagine.
To use the Browser Guard feature introduced in Rails 7.2, you can leverage the allow_browser method to restrict access to your application based on the user’s browser version. This is particularly useful for applications relying on modern browser features (e.g., WebP images, Web Push, CSS Nesting, or Importmaps) that may not work in outdated browsers.