req icon indicating copy to clipboard operation
req copied to clipboard

Redirect with cookie handling

Open bitboxer opened this issue 9 months ago • 1 comments

A lot of pages have this redirect flow:

  1. user opens example.com/
  2. auth system adds cookie for user data, redirects again to example.com/ if cookie is not set
  3. 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.

bitboxer avatar May 19 '24 12:05 bitboxer