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
Some of the routes here use a trailing slash, such as /ws/healthz/, some don't, such as /ws/data/all. Since you are using flask, the redirect from /ws/healthz to /ws/healthz/ Just Works™, while not the other way around. Using routes with trailing slashes everywhere might be less confusing.
I suspect we have to be careful about using/requiring trailing slashes in routes for code for those with three path elements as we need to maintain equivalence with how the Java version of the back end service worked originally.
The trailing slash redirection may well work for the back end service, but the front end client which has the path fixed, and which needs to still work with Java back end service types, possibly isn't going to handle the redirection. We can't change the front end client to use a trailing slash instead as the Java back ends can't handle trailing slash for three element path versions of URL that I remember, yet require the trailing slash for the two element path versions.
I don't know if there is a difference, but that documentation about redirection behaviour is also for Flask itself. Does that still apply for Flask-Restful, which is what we use as a layer on top?
Anyway, the important thing is we need to work the same as how Java back end services worked and they don't handle lack of trailing slashes the same.
I will leave this here to look at next time am working on the apps.
Some of the routes here use a trailing slash, such as
/ws/healthz/
, some don't, such as/ws/data/all
. Since you are using flask, the redirect from/ws/healthz
to/ws/healthz/
Just Works™, while not the other way around. Using routes with trailing slashes everywhere might be less confusing.See the Unique URLs / Redirection Behavior in Flask Quickstart.
The text was updated successfully, but these errors were encountered: