BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
34685c58
Commit
34685c58
authored
Feb 27, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-webpack-dev-server-proxy' into 'master'
Fix webpack dev server when behind proxy See merge request !9543
parents
bbba5eb0
48707bc2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
webpack_proxy.rb
lib/gitlab/middleware/webpack_proxy.rb
+6
-6
No files found.
lib/gitlab/middleware/webpack_proxy.rb
View file @
34685c58
...
...
@@ -8,16 +8,16 @@ module Gitlab
@proxy_host
=
opts
.
fetch
(
:proxy_host
,
'localhost'
)
@proxy_port
=
opts
.
fetch
(
:proxy_port
,
3808
)
@proxy_path
=
opts
[
:proxy_path
]
if
opts
[
:proxy_path
]
super
(
app
,
opts
)
super
(
app
,
backend:
"http://
#{
proxy_host
}
:
#{
proxy_port
}
"
,
**
opts
)
end
def
perform_request
(
env
)
unless
@proxy_path
&&
env
[
'PATH_INFO'
].
start_with?
(
"/
#{
@proxy_path
}
"
)
return
@app
.
call
(
env
)
if
@proxy_path
&&
env
[
'PATH_INFO'
].
start_with?
(
"/
#{
@proxy_path
}
"
)
super
(
env
)
else
@app
.
call
(
env
)
end
env
[
'HTTP_HOST'
]
=
"
#{
@proxy_host
}
:
#{
@proxy_port
}
"
super
(
env
)
end
end
end
...
...
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