fix: don't overwrite history with 404 page#583
fix: don't overwrite history with 404 page#583Aeledfyr wants to merge 1 commit intoNerimity:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe catch-all route handler was refactored to use the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
it was done like this because i wanted to html to load status code 404 using nginx |
|
Would it be possible to use a proper redirect? The current approach seems to be replacing the history entry for the invalid url (or something else; the invalid url doesn't show up in the back history) |
|
not sure how i would do that hm |
This makes unknown routes return the 404 page directly, rather than overwriting the current history entry with
/404. This is partially for convenience when working with DEV-only pages (#576), but it's also better behavior overall -- the 404 handler shouldn't overwrite the url, since it makes figuring out why it failed harder.Did you test your code?
Tested on Firefox on desktop and Chrome on android.
Checklist
Summary by CodeRabbit