Problem Details:
When route parameters contain special or encoded characters, routing fails. Examples include:
-
Special characters
-
Encrypted strings
-
Base64 values (
+,/,=) -
Dots (
.) -
Encoded or unencoded slashes (
/)
Traefik appears to treat some of these characters (especially /) as path separators instead of part of the parameter value.
Observed Behavior:
-
Requests that work locally (via Kestrel) fail when routed through Traefik
-
Traefik fails route matching
-
Backend application returns 400 Bad Request
-
Headers (including auth tokens) are valid and unchanged
Expected Behavior:
-
Route parameters should be passed to the backend exactly as encoded
-
URL decoding behavior should be consistent with standard HTTP handling (or configurable)
-
Encoded characters (e.g.,
%2F) should not break route matching
-
Is there a configuration in Traefik to control URL decoding behavior for route parameters?
-
Can Traefik be configured to preserve encoded slashes (
%2F) instead of interpreting them as path separators? -
Are there recommended middlewares (e.g., ReplacePathRegex, StripPrefix, etc.) to handle this scenario?
-
Is this expected behavior or a known limitation?