Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount grack under http_server_subdir #621

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down