Hey everyone
I noticed, that everything behind a question mark in the url path isn't matched in regex for unauthenticated paths, is this a known issue?
https://www.reddit.com/r/Authentik/comments/1hqfk5a/unauthenticated_paths_regex_for_proxy_provider/
#Authentik Regex for unauthenticated URLs with Forward Auth Proxy Provider
1 messages · Page 1 of 1 (latest)
thank you for your answer, I tested the regex too in this tester and came to the same solution as you, but this didn't work
I changed the regex for the unauthenticated path; see below -> it doesn't match
what I learned through my testing, that the first slash does not need to be escaped with such as \/ and everyhting after a question mark isn't queried, as shown in the logs down below
trace | event=nginx forwarded url logger=authentik.outpost.proxyv2.application name=Wastebin timestamp=2025-01-04T06:18:01+01:00 url=https://app.mydomain.coml/j595b?dl=cpp
trace | event=Matching URL against allow list logger=authentik.outpost.proxyv2.application match=false name=Wastebin regex=\/.*\?dl=.* timestamp=2025-01-04T06:18:01+01:00 url=/lj595b
trace | event=Matching URL against allow list logger=authentik.outpost.proxyv2.application match=false name=Wastebin regex=^/.*\..*$ timestamp=2025-01-04T06:18:01+01:00 url=/lj595b
trace | event=Matching URL against allow list logger=authentik.outpost.proxyv2.application match=false name=Wastebin regex=^/burn/.*$ timestamp=2025-01-04T06:18:01+01:00 url=/lj595b
INF | event=/outpost.goauthentik.io/auth/nginx host=bin.mahrnet.ch logger=authentik.outpost.proxyv2.application method=GET name=Wastebin remote=10.46.98.11:57610 runtime=1.458 scheme=http size=21 status=401 timestamp=2025-01-04T06:18:01+01:00 user_agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
did you get working regex just to match the url=/lj595b ?
the regex I use to match url=/lj595b is ^/[\w+-]{6,7}$
^ = beginning
[\w+-]{6,7} = alphanumeric string with - and +, min length 6 and max length 7 characters
$ = ending
it works for now, but I don't think that this is intended behaviour of authentik
I am pretty sure I found the issue I might submit a PR
its only looking at the Path rather than the URI