You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
At Zalando we have defined a guiding rule for API designers to specify APIs without empty path segments and trailing slashes
However, client implementations in production may be configured poorly to contain trailing slashes which the rule also suggests the server to protect against by
We recommend to implement services robust against clients not following this rule. All services
should normalize request paths before processing by removing duplicate and trailing slashes.
This can be implemented in a simple filter in Skipper.
Describe the solution you would like
A normalizePath()-filter which transforms URLs to contain no empty path segments and no trailing slashes.
URLs such as
GET /orders/{order-id}
GET /orders/{order-id}/
GET /orders//{order-id}
should be normalized to /orders/{order-id}.
Describe alternatives you've considered (optional)
We can achieve this by using the existing modPath-filter and a regular expression, which can be sufficient but also lead to incidents where the regular expression is poorly written and breaks production environment.
Additional context (optional)
Add any other context or screenshots about the feature request here.
Would you like to work on it?
Yes
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
At Zalando we have defined a guiding rule for API designers to specify APIs without empty path segments and trailing slashes
However, client implementations in production may be configured poorly to contain trailing slashes which the rule also suggests the server to protect against by
This can be implemented in a simple filter in Skipper.
Describe the solution you would like
A
normalizePath()
-filter which transforms URLs to contain no empty path segments and no trailing slashes.URLs such as
should be normalized to
/orders/{order-id}
.Describe alternatives you've considered (optional)
We can achieve this by using the existing
modPath
-filter and a regular expression, which can be sufficient but also lead to incidents where the regular expression is poorly written and breaks production environment.Additional context (optional)
Add any other context or screenshots about the feature request here.
Would you like to work on it?
Yes
The text was updated successfully, but these errors were encountered: