Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
21e55ca3
Commit
21e55ca3
authored
12 years ago
by
Chris Frohoff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added RAILS_RELATIVE_URL_ROOT support
parent
e9394c48
8-5-nxd
8-1-stable
8-2-nxd
8-2-stable
8-4-nxd
8-4-stable
8-5-stable
8-6-nxd
8-6-stable
8-7-nxd
8-8-nxd
master
q/check-exit-code
x
y/archive.xz
v8.11.0.pre
v8.10.3
v8.10.2
v8.10.1
v8.10.0
v8.10.0.pre
v8.10.0-rc13
v8.10.0-rc12
v8.10.0-rc11
v8.10.0-rc10
v8.10.0-rc9
v8.10.0-rc8
v8.10.0-rc7
v8.10.0-rc6
v8.10.0-rc5
v8.10.0-rc4
v8.10.0-rc3
v8.10.0-rc2
v8.10.0-rc1
v8.9.6
v8.9.5
v8.9.4
v8.9.3
v8.9.2
v8.9.1
v8.9.0
v8.9.0-rc8
v8.9.0-rc7
v8.9.0-rc6
v8.9.0-rc5
v8.9.0-rc4
v8.9.0-rc3
v8.9.0-rc2
v8.9.0-rc1
v8.8.7
v8.8.6
v8.8.5
v8.8.4
v8.8.3
v8.8.2
v8.8.1
v8.8.0
v8.8.0-rc2
v8.8.0-rc1
v8.7.9
v8.7.8
v8.7.7
v8.7.6
v8.7.5
v8.7.4
v8.7.3
v8.7.2
v8.7.1
v8.7.0
v8.7.0-rc7
v8.7.0-rc6
v8.7.0-rc5
v8.7.0-rc4
v8.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6.0.2
v6.0.1
v6.0.0
v5.4.2
v5.4.1
v5.4.0
v5.3.0
v5.2.1
v5.2.0
v5.1.0
v5.0.1
v5.0.0
v4.2.0
v4.1.0
test-fix
show
rtl-7.6.1
rtl-7.5.1
rtl-7.4.2.1
rtl-7.4.2
fondev
TR.8.4.4
No related merge requests found
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
7 deletions
+16
-7
app/mailers/notify.rb
app/mailers/notify.rb
+1
-0
config.ru
config.ru
+4
-1
config/gitlab.yml.example
config/gitlab.yml.example
+3
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+3
-1
config/routes.rb
config/routes.rb
+1
-1
config/unicorn.rb.example
config/unicorn.rb.example
+4
-0
lib/gitlab/backend/grack_auth.rb
lib/gitlab/backend/grack_auth.rb
+0
-4
No files found.
app/mailers/notify.rb
View file @
21e55ca3
...
...
@@ -6,6 +6,7 @@ class Notify < ActionMailer::Base
default_url_options
[
:host
]
=
Gitlab
.
config
.
gitlab
.
host
default_url_options
[
:protocol
]
=
Gitlab
.
config
.
gitlab
.
protocol
default_url_options
[
:port
]
=
Gitlab
.
config
.
gitlab
.
port
if
Gitlab
.
config
.
gitlab_on_non_standard_port?
default_url_options
[
:script_name
]
=
Gitlab
.
config
.
gitlab
.
relative_url_root
default
from:
Gitlab
.
config
.
gitlab
.
email_from
...
...
This diff is collapsed.
Click to expand it.
config.ru
View file @
21e55ca3
# This file is used by Rack-based servers to start the application.
require
::
File
.
expand_path
(
'../config/environment'
,
__FILE__
)
run
Gitlab
::
Application
map
ENV
[
'RAILS_RELATIVE_URL_ROOT'
]
||
"/"
do
run
Gitlab
::
Application
end
This diff is collapsed.
Click to expand it.
config/gitlab.yml.example
View file @
21e55ca3
...
...
@@ -18,6 +18,9 @@ gitlab:
host: localhost
port: 80
https: false
# uncomment and customize to run in non-root path
# note that ENV['RAILS_RELATIVE_URL_ROOT'] in config/unicorn.rb may need to be changed
# relative_url_root: /gitlab
## Email settings
# Email address used in the "From" field in mails sent by GitLab
...
...
This diff is collapsed.
Click to expand it.
config/initializers/1_settings.rb
View file @
21e55ca3
...
...
@@ -25,7 +25,8 @@ class Settings < Settingslogic
[
gitlab
.
protocol
,
"://"
,
gitlab
.
host
,
custom_port
custom_port
,
gitlab
.
relative_url_root
].
join
(
''
)
end
end
...
...
@@ -45,6 +46,7 @@ Settings.gitlab['default_projects_limit'] ||= 10
Settings
.
gitlab
[
'host'
]
||=
'localhost'
Settings
.
gitlab
[
'https'
]
||=
false
Settings
.
gitlab
[
'port'
]
||=
Settings
.
gitlab
.
https
?
443
:
80
Settings
.
gitlab
[
'relative_url_root'
]
||=
''
Settings
.
gitlab
[
'protocol'
]
||=
Settings
.
gitlab
.
https
?
"https"
:
"http"
Settings
.
gitlab
[
'email_from'
]
||=
"gitlab@
#{
Settings
.
gitlab
.
host
}
"
Settings
.
gitlab
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_url
)
...
...
This diff is collapsed.
Click to expand it.
config/routes.rb
View file @
21e55ca3
...
...
@@ -18,7 +18,7 @@ Gitlab::Application.routes.draw do
project_root:
Gitlab
.
config
.
gitolite
.
repos_path
,
upload_pack:
Gitlab
.
config
.
gitolite
.
upload_pack
,
receive_pack:
Gitlab
.
config
.
gitolite
.
receive_pack
}),
at:
'/
:path'
,
constraints:
{
path:
/[-\/\w\.-]+\.git/
}
}),
at:
'/
'
,
constraints:
lambda
{
|
request
|
/[-\/\w\.-]+\.git/
.
match
(
request
.
path_info
)
}
#
# Help
...
...
This diff is collapsed.
Click to expand it.
config/unicorn.rb.example
View file @
21e55ca3
# uncomment and customize to run in non-root path
# note that config/gitlab.yml web path should also be changed
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
app_dir = "/home/gitlab/gitlab/"
worker_processes 2
working_directory app_dir
...
...
This diff is collapsed.
Click to expand it.
lib/gitlab/backend/grack_auth.rb
View file @
21e55ca3
...
...
@@ -17,10 +17,6 @@ module Grack
# Pass Gitolite update hook
ENV
[
'GL_BYPASS_UPDATE_HOOK'
]
=
"true"
# Need this patch due to the rails mount
@env
[
'PATH_INFO'
]
=
@request
.
path
@env
[
'SCRIPT_NAME'
]
=
""
# Find project by PATH_INFO from env
if
m
=
/^\/([\w\.\/-]+)\.git/
.
match
(
@request
.
path_info
).
to_a
self
.
project
=
Project
.
find_with_namespace
(
m
.
last
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment