tailscale/safeweb
Andrew Lytvynov 3477bfd234
safeweb: add support for "/" and "/foo" handler distinction (#13980)
By counting "/" elements in the pattern we catch many scenarios, but not
the root-level handler. If either of the patterns is "/", compare the
pattern length to pick the right one.

Updates https://github.com/tailscale/corp/issues/8027

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2024-10-31 11:12:38 -07:00
..
http_test.go safeweb: add support for "/" and "/foo" handler distinction (#13980) 2024-10-31 11:12:38 -07:00
http.go safeweb: add support for "/" and "/foo" handler distinction (#13980) 2024-10-31 11:12:38 -07:00