[GH-ISSUE #5626] Reverse Proxy doesn't set path of auth cookie #11808

Open
opened 2026-08-05 01:31:06 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @patrickpichler on GitHub (Mar 18, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5626

Describe the problem

The cookie set by the auth control of the reverse proxy is missing the Path options (src). According to MDN if the path is omitted, the browser will fill in the path component of the request URL (docs).

This causes issues with services such as Immichs share feature, as the share URL will look like example.com/share/aaabbcccc, but when opening it, it will also try to load resources from example.com/_app/xyz. Since the cookie is set with path /share, the requests to /_app will fail with 401.

To Reproduce

Steps to reproduce the behavior:

  1. Host some kind of webserver (for example this dummy one using ncat: while true ; do ncat -l -p 1500 -c 'echo "HTTP/1.1 200 OK\n\n $(date)"'; done)
  2. Expose it as a reverse proxy service protected by authentication
  3. Navigate to /hello/world and authenticate
  4. Navigate to /foo/bar and observe that you need to authenticate again

Expected behavior

Authentication should only happen once.

Are you using NetBird Cloud?

NetBird Cloud

NetBird version

0.65.3

Is any other VPN software installed?

No

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (not applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @patrickpichler on GitHub (Mar 18, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5626 **Describe the problem** The cookie set by the auth control of the reverse proxy is missing the `Path` options ([src](https://github.com/netbirdio/netbird/blob/80a8816b1dbb46d9dd3525f54abdb948ce04da66/proxy/internal/auth/middleware.go#L413)). According to MDN if the path is omitted, the browser will fill in the path component of the request URL ([docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie#pathpath-value)). This causes issues with services such as [Immich](https://github.com/immich-app/immich)s share feature, as the share URL will look like `example.com/share/aaabbcccc`, but when opening it, it will also try to load resources from `example.com/_app/xyz`. Since the cookie is set with path `/share`, the requests to `/_app` will fail with `401`. **To Reproduce** Steps to reproduce the behavior: 1. Host some kind of webserver (for example this dummy one using `ncat`: `while true ; do ncat -l -p 1500 -c 'echo "HTTP/1.1 200 OK\n\n $(date)"'; done`) 2. Expose it as a reverse proxy service protected by authentication 3. Navigate to `/hello/world` and authenticate 4. Navigate to `/foo/bar` and observe that you need to authenticate again **Expected behavior** Authentication should only happen once. **Are you using NetBird Cloud?** NetBird Cloud **NetBird version** `0.65.3` **Is any other VPN software installed?** No **Have you tried these troubleshooting steps?** - [ ] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (not applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:31:06 -04:00
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11808