openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
937 stars 440 forks source link

redirect in the routes.rb make impossible to install obs in a subdirectory #8302

Open vpereira opened 5 years ago

vpereira commented 5 years ago

To keep the old routes reachable, we are using redirect in the routes.rb as route aliases to make them routable. The problem is that because we are adding things like '/user/register_user` it may break the supported use case (???) when the user configures obs to run in a virtual directory on Apache

vpereira commented 5 years ago

Reading the https://api.rubyonrails.org/v5.0/classes/ActionDispatch/Routing/Redirection.html#method-i-redirect sounds like it should work as expected, no?

Note that if you return a path without a leading slash then the url is prefixed with the current SCRIPT_NAME environment variable. This is typically '/' but may be different in a mounted engine or where the application is deployed to a subdirectory of a website.