Consider that URL can end with '/' before redirecting. #7975
This commit is contained in:
parent
0e344aa229
commit
df8776f480
1 changed files with 1 additions and 1 deletions
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue