BigW Consortium Gitlab

Commit fca95708 by Dmitriy Zaporozhets

Merge pull request #1020 from SaitoWu/feature/https

Feature/https
parents f73d7181 aefe4dc3
...@@ -5,7 +5,10 @@ module Grack ...@@ -5,7 +5,10 @@ module Grack
# Authentication with username and password # Authentication with username and password
email, password = @auth.credentials email, password = @auth.credentials
user = User.find_by_email(email) user = User.find_by_email(email)
return false unless user.valid_password?(password) return false unless user.try(:valid_password?, password)
# Need this patch because the rails mount
@env['PATH_INFO'] = @env['REQUEST_PATH']
# Find project by PATH_INFO from env # Find project by PATH_INFO from env
if m = /^\/([\w-]+).git/.match(@env['PATH_INFO']).to_a if m = /^\/([\w-]+).git/.match(@env['PATH_INFO']).to_a
......
...@@ -18,7 +18,7 @@ Gitlab::Application.routes.draw do ...@@ -18,7 +18,7 @@ Gitlab::Application.routes.draw do
project_root: GIT_HOST['base_path'], project_root: GIT_HOST['base_path'],
upload_pack: GIT_HOST['upload_pack'], upload_pack: GIT_HOST['upload_pack'],
receive_pack: GIT_HOST['receive_pack'] receive_pack: GIT_HOST['receive_pack']
}), at: '/git' }), at: '/:path', constraints: { path: /[\w-]+.git*/ }
# #
# Help # Help
......
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