Skip to content

Commit 71a9b8e

Browse files
authored
Merge pull request #621 from eole/fix/mount-grack-under-http_server_subdir
Mount grack under http_server_subdir
2 parents 91ea8ca + 7354de3 commit 71a9b8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: config/routes.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040
get 'settings/plugin/:id/install_gitolite_hooks', to: 'settings#install_gitolite_hooks', as: 'install_gitolite_hooks'
4141

4242
# Enable SmartHTTP Grack support
43-
mount Grack::Bundle.new({}), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post]
43+
mount Grack::Bundle.new({}),
44+
at: (RedmineGitHosting::Config.http_server_subdir rescue '/'),
45+
constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) },
46+
via: [:get, :post]
4447

4548
# Post Receive Hooks
4649
mount Hrack::Bundle.new({}), at: 'githooks/post-receive/:type/:projectid', via: [:post]

0 commit comments

Comments
 (0)