From 7354de307455ff0723c2e1257bc0629824295931 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Wed, 5 Oct 2016 14:15:51 +0200 Subject: [PATCH] Mount grack under http_server_subdir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * config/routes.rb: Use “RedmineGitHosting::Config.http_server_subdir” with a fallback on “/”. --- config/routes.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 5ffa55765..34d8a4271 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -40,7 +40,10 @@ get 'settings/plugin/:id/install_gitolite_hooks', to: 'settings#install_gitolite_hooks', as: 'install_gitolite_hooks' # Enable SmartHTTP Grack support -mount Grack::Bundle.new({}), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post] +mount Grack::Bundle.new({}), + at: (RedmineGitHosting::Config.http_server_subdir rescue '/'), + constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, + via: [:get, :post] # Post Receive Hooks mount Hrack::Bundle.new({}), at: 'githooks/post-receive/:type/:projectid', via: [:post]