Commit 4bc7d6e3 authored by Drew Blessing's avatar Drew Blessing

Merge branch 'issue_7975' into 'master'

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

Closes #7975

See merge request !2416
parents 03604b39 df8776f4
...@@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base ...@@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base
# localhost/group/project # localhost/group/project
# #
if id =~ /\.git\Z/ 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 end
project_path = "#{namespace}/#{id}" project_path = "#{namespace}/#{id}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment