avoid redirect loops
See original GitHub issueReference: https://github.com/nuxt/framework/pull/3908#issuecomment-1079665687
With redirectTo
, it is possible to make a loop condition return navigateTo(to.path)
.
A simple fix would be check and avoid redirect to exact same URL.
In more complex cases, a redirect loop can be nested like a~>b~>a which we could implement with help of a persisted state. (we can wait for this until having session support and benefit from session to hold such state)
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Redirect Loops: Why they harm your SEO performance
You need to avoid redirect loops, because they make visitors—and search engines—get stuck on your website. Like this: Redirect loop ...
Read more >How To Easily Find And Fix Redirect Loops Error in WordPress?
This post will teach you everything about redirect loops and how to find and fix them easily with actionable steps.
Read more >Avoiding redirect loop - php - Stack Overflow
Make sure that in frontend/pages/maintenance.php you do not redirect to index.php?page=maintenance or you will still get into loops.
Read more >How to Fix The ERR_TOO_MANY_REDIRECTS Error - Kinsta
Due to the fact that redirect loops are responses that can be cached, it's always recommended to try clearing the cache on your...
Read more >How to Solve This Webpage has a Redirect Loop Problem
Redirect loop is like a situation wherein “A points to B and B points back to A”. Such a redirection will keep browser...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your reply, I changed the method, using the state to access the value
I don’t know what your exit conditions are, or how I should write them,
This is a normal routing guard logic @danielroe @pi0 @fanqidong @chenmaolan @