Remove /uploads/:namespace/:project route
There is a redundant route in config/routes/uploads.rb
:
get ":namespace_id/:project_id/:secret/:filename",
This duplicates the route in https://gitlab.com/gitlab-org/gitlab/blob/v12.6.3-ee/config/routes/project.rb#L506.
This becomes an issue because url_for
will construct a route for the former since it's loaded first. In !22822 (merged), we'll redirect the first route to the second just in case it's being used. Then we can consider removing this as well as the workaround in Projects::UploadsController#build_canonical_route
.
Edited by Stan Hu