Redirecting all unused suburls to parent suburl #81
Closed
rand
wants to merge 7 commits from 20220208_redirecting_all_unused_suburls
into 20220208_removing_trailing_slashes
Loading…
Reference in new issue
There is no content yet.
Delete Branch '20220208_redirecting_all_unused_suburls'
Deleting a branch is permanent. It CANNOT be undone. Continue?
This is a nicety for certain users, including me - where one wants to be able to remove parts of an url structure, and then expect to get some sensible page in return. In other terms, it makes the url-tree be traversible towards the root, without there being "holes" returning "page not found".
let p = Dream.path req |> Utils.List.drop_last 1 |> String.concat "/" in
"/" ^ p
in
(*> goto brian on correct status here*)
What does this mean? :)
Hehe, my own note-language - should have written in normal language (; goto = todo, brian = brainstorm
Dream.get "/compare/:build_left/:build_right" (w compare_builds);
Dream.post "/upload" (Authorization.authenticate (w upload));
Dream.post "/job/:job/platform" redirect_to_parent;
Dream.post "/job/:job/platform/:platform" redirect_to_parent;
I don't think it is worth to have these POST redirects that lead a client to POST to /job/:job. The rest is fine with me.