Use the native allow_browser guard instead of a disabled custom concern#108
Open
ashwin47 wants to merge 1 commit into
Open
Use the native allow_browser guard instead of a disabled custom concern#108ashwin47 wants to merge 1 commit into
ashwin47 wants to merge 1 commit into
Conversation
…low_browser guard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Browser version gating was implemented as a custom
AllowBrowserconcern that had been turned into a no-op, plus an orphaned multilingual "unsupported browser" view that nothing rendered. The whole cluster — concern, view, and its i18n string — only existed to point at itself.This swaps that ~40 lines of dead/custom code for Rails' built-in
allow_browser versions: :moderninApplicationController. The guard is now actually active: outdated browsers (Safari <17.2, Chrome <120, Firefox <121, IE) get the existing styledpublic/406-unsupported-browser.htmlinstead of being silently served.Non-browser clients (health checks, bots, API, native webviews) are unaffected —
allow_browseronly acts on user agents it recognizes as old browsers. Modern Hotwire Native iOS rides on current Safari, so it stays above the threshold.🤖 Generated with Claude Code