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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
48707bc2
Commit
48707bc2
authored
Feb 27, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure webpack dev server proxy connects regardless of request headers
parent
83d44076
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lib/gitlab/middleware/webpack_proxy.rb
lib/gitlab/middleware/webpack_proxy.rb
+6
-6
No files found.
lib/gitlab/middleware/webpack_proxy.rb
View file @
48707bc2
...
@@ -8,16 +8,16 @@ module Gitlab
...
@@ -8,16 +8,16 @@ module Gitlab
@proxy_host
=
opts
.
fetch
(
:proxy_host
,
'localhost'
)
@proxy_host
=
opts
.
fetch
(
:proxy_host
,
'localhost'
)
@proxy_port
=
opts
.
fetch
(
:proxy_port
,
3808
)
@proxy_port
=
opts
.
fetch
(
:proxy_port
,
3808
)
@proxy_path
=
opts
[
:proxy_path
]
if
opts
[
:proxy_path
]
@proxy_path
=
opts
[
:proxy_path
]
if
opts
[
:proxy_path
]
super
(
app
,
opts
)
end
def
perform_request
(
env
)
super
(
app
,
backend:
"http://
#{
proxy_host
}
:
#{
proxy_port
}
"
,
**
opts
)
unless
@proxy_path
&&
env
[
'PATH_INFO'
].
start_with?
(
"/
#{
@proxy_path
}
"
)
return
@app
.
call
(
env
)
end
end
env
[
'HTTP_HOST'
]
=
"
#{
@proxy_host
}
:
#{
@proxy_port
}
"
def
perform_request
(
env
)
if
@proxy_path
&&
env
[
'PATH_INFO'
].
start_with?
(
"/
#{
@proxy_path
}
"
)
super
(
env
)
super
(
env
)
else
@app
.
call
(
env
)
end
end
end
end
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