Redirect loop on resource root path / + cookie explosion (p_session_token_s.*) . Non-root paths work though.
- Dominant language
- TypeScript
- Stars
- 22.8k
- Forks
- 783
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 52
Description
### Describe the Bug
When accessing a protected resource at the root path (https://foo.example.com/), Pangolin enters a redirect loop to the auth endpoint and the browser shows` ERR_TOO_MANY_REDIRECTS`. During the loop, Pangolin repeatedly sets new resource session cookies, resulting in dozens of cookies named p_session_token_s. under the resource domain (foo.example.com).
Accessing a non-root path such as https://foo.example.com/bar_page successfully proxies to the backend service. This suggests the issue is tied specifically to root-path redirect / auto-redirect logic.
### Environment
- OS Type & Version: Linux oracle-arm1 6.14.0-1010-oracle #10~24.04.1-Ubuntu aarch64
- Pangolin Version:1.14.1
- Gerbil Version:1.3.0
- Traefik Version:3.6.6
- Newt Version:1.8.1
- Olm Version: (if applicable)
### To Reproduce
1. Configure Pangolin with base domain example.com
2. Deploy Pangolin at pangolin.example.com
3. Create a protected resource at foo.example.com routed to a backend service at a newt with 127.0.0.1:port
4. Visit https://foo.example.com/ and observe a redirect loop to https://pangolin.example.com/auth/resource/?redirect=https://foo.example.com/ and eventually `ERR_TOO_MANY_REDIRECTS`
5. Open DevTools → Application → Cookies → https://foo.example.com and observe many cookies named p_session_token_s. being created
6. Visit https://foo.example.com/whatever and observe that the backend loads successfully
### Expected Behavior
Visiting https://foo.example.com/ authenticates once and proxies to the backend without a redirect loop
Only a single resource session cookie should be created
Contributor guide
Assessment
This issue has not been assessed yet.