req
req copied to clipboard
Redirect with cookie handling
A lot of pages have this redirect flow:
- user opens example.com/
- auth system adds cookie for user data, redirects again to example.com/ if cookie is not set
- browser loads example.com/ again
If the cookie coming from the redirect is not set and send to step 3, the auth system will again do the redirect. This will end up redirecting till the TooManyRedirectsError
is fired.
An example of this behavior is the washington post (try with this: https://www.washingtonpost.com/business/2024/05/19/consumer-sentiment-vibes/)
The redirect system of req should have a minimal cookie handling in place for this.