Matcher for page fragment identifier (hash token)?

Traefik's rules for routing cover a lot of bases, but I can't seem to figure out how to create logic based on the page fragment identifier (commonly used in single page apps). This is the last portion of some URLs - the part after the # (hash symbol).

Am I overlooking something, or is there no way to access that portion of the URL?

Alternatively, is there a way to create a rule / matcher using the entire URL? I have a URL like the following...

  • https://mydomain.com/admin/#/login

...but I can't seem to access the #/login part using a Traefik rule. While it looks like part of the path, everything after the hash symbol is actually a page fragment identifier.

If I could access either that or the entire URL, I think I'd be in business.

Any ideas? Am I overlooking something obvious?

There seems to be no build-in matcher for the hash, see rule.

To my understanding middlewares only run after the matcher (docs), so that’s no solution.

You could only try PathPrefix with ”Regexp Syntax".

PS: looks like SvelteKit :slight_smile:

@shot have you been able to find a solution for this? I am facing the same challenge currently with the alertmanager which also using page fragment identifier (https://alertmanager.local/#/silences).

No, because there isn’t one. I was in fact overlooking something obvious. Page fragment identifiers are a client-side thing only, so they are (according to spec) never sent from the client. They can, of course, be leveraged by frontend code, but not for backend logic.