-
Notifications
You must be signed in to change notification settings - Fork 89
fix: exclude .well-known paths from catch-all route #2049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
fix: exclude .well-known paths from catch-all route #2049
Conversation
Fixes MIRU-WEB-7 Prevents ActionView::MissingTemplate errors when requests are made to .well-known/assetlinks.json by excluding these paths from the catch-all route and adding proper format handling in HomeController. Sentry: https://saeloun-inc.sentry.io/issues/MIRU-WEB-7
📝 WalkthroughWalkthroughCatch-all routes now exclude paths starting with Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant HomeController
participant AdminApp
Client->>Router: GET /.well-known/assetlinks.json
alt Before change (catch-all matched)
Router->>HomeController: route to index (format=json)
HomeController->>HomeController: render (no json template)
HomeController-->>Client: 500 ActionView::MissingTemplate (error)
else After change (excluded + controller handling)
Router--xClient: 404 Not Found
note right of Router: OR
Router->>HomeController: route to index (if matched)
HomeController->>HomeController: respond_to -> head :not_found for json
HomeController-->>Client: 404 Not Found
end
Client->>Router: GET / (html)
Router->>HomeController: route to index
HomeController->>HomeController: if admin -> redirect to AdminApp
HomeController-->>Client: HTML response or redirect
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…issing-template-home-index
Closes #2048
Prevents ActionView::MissingTemplate errors when requests are made to .well-known/assetlinks.json by excluding these paths from the catch-all route and adding proper format handling in HomeController.
Sentry: https://saeloun-inc.sentry.io/issues/MIRU-WEB-7
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.