Skip to content
Snippets Groups Projects
Commit df8776f4 authored by Rubén Dávila's avatar Rubén Dávila
Browse files

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

parent 0e344aa2
No related branches found
No related tags found
1 merge request!2416Consider that URL can end with '/' before redirecting.
Pipeline #
Loading
@@ -115,7 +115,7 @@ class ApplicationController < ActionController::Base
Loading
@@ -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}"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment