Consider that URL can end with '/' before redirecting. #7975

This commit is contained in:
Rubén Dávila 2016-01-13 17:03:24 -05:00
parent 0e344aa229
commit df8776f480
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base
# localhost/group/project
#
if id =~ /\.git\Z/
redirect_to request.original_url.gsub(/\.git\Z/, '') and return
redirect_to request.original_url.gsub(/\.git\/?\Z/, '') and return
end
project_path = "#{namespace}/#{id}"