I have issues on only one ISP (Internet Service Provider) where any request will always redirect to homepage.
I reiterate - I only see this behaviour with one specific ISP, and very consistent - 95% of the time.
RESPONSE 1 (before redirect)
Result is : `frontend=; expires=Sat, 30 Jan 2021 11:02:11 GMT; path=/; domain=www.example.com; Secure; SameSite=None` Location: https://www.example.com/
REQUEST 2 (after auto redirecting)
RESPONSE 2 (this is the final response)
frontend=fedcba; expires=Sat, 30-Jan-2021 11:02:12 GMT; Max-Age=86400; path=/; domain=www.example.com; secure; httponly
See that Request 1 has a cookie
abcdef, but response is
frontend= (empty). with location set
Request 2 then has cookie
frontend= (empty) and a response with a new cookie
frontend=fedbca is created.
Refreshing this page again immediately after this response 2 then creates a new redirect/new cookie. These cookies never persist.
The only difference that I see between a working request (ie. other other internet connection ISP) is that the response received (RESPONSE 2) has Max-Age set and a working request does not have it set.
Working request (one request - no redirects / cookie persists between refreshes etc)
frontend=persistentcookie; expires=Sat, 30-Jan-2021 11:02:12 GMT; path=/; domain=www.example.com; secure; httponly
Which code validates and recreates the Cookies?
app/code/core/Mage/Model/Cookie.php just sets the data but I don't know where the session gets verified and cookie recreated.
Max-Age come from (as I compare it to working ones which do not have it set).
This is an extremely confusing issue.
I would appreciate some advice!