Authentik websocket regex

Hi,
I'm trying to solve my websocket problem with authentik.
I found many times I should add
- " traefik.http.routers.authentik.rule: Host(authentik.mydomain.at) || HostRegexp({subdomain:[A-Za-z0-9](?:[A-Za-z0-9\-]{0,61}[A-Za-z0-9])?}.mydomain.at) && PathPrefix(/outpost.goauthentik.io/)"
to the labels.
When I add it, I get an error for "invalid escape sequence" with reference to the \ in this part [A-Za-z0-9](?:[A-Za-z0-9-]
Could anyone help me with whats wrong with tis statement?
Thank you

Interesting, the backslash- does not even show up here.

is old Traefik v2, I think it has changed with v3 (doc).

Thanks for the answer, that might be true but it's complaining about the regex term. I believe subdomain should still work with v3. I'm not very good in regex, and I'm asking for help with that.

The challenge is the escaping. You might need to escape the dash to be recognized by regex as character. But you might need to escape the sequence again, as it is placed in a yaml file.

Try \\-.

Thanks a lot. It accepts the code now. We see if it solves my problem :slight_smile: