New Discussion

Notifications

You’re not receiving notifications from this thread.

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.

https://github.com/rails/rails/blob/v7.2.0/actionpack/lib/action_controller/metal/allow_browser.rb#L88

This adds a solid layer of security against session hijacking in Rails.

Join the discussion
Create an account Log in