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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a88675ca
Commit
a88675ca
authored
Nov 03, 2020
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the HTTP host header to webpack-dev-server
parent
66a6e85f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lib/gitlab/webpack/dev_server_middleware.rb
lib/gitlab/webpack/dev_server_middleware.rb
+6
-6
No files found.
lib/gitlab/webpack/dev_server_middleware.rb
View file @
a88675ca
...
...
@@ -16,14 +16,14 @@ module Gitlab
super
(
app
,
backend:
"
#{
@proxy_scheme
}
://
#{
@proxy_host
}
:
#{
@proxy_port
}
"
,
**
opts
)
end
# disable SSL check since any cert used here will likely be self-signed
def
rewrite_env
(
env
)
env
[
"rack.ssl_verify_none"
]
=
true
env
end
def
perform_request
(
env
)
if
@proxy_path
&&
env
[
'PATH_INFO'
].
start_with?
(
"/
#{
@proxy_path
}
"
)
# disable SSL check since any cert used here will likely be self-signed
env
[
'rack.ssl_verify_none'
]
=
true
# ensure we pass the expected Host header so webpack-dev-server doesn't complain
env
[
'HTTP_HOST'
]
=
"
#{
@proxy_host
}
:
#{
@proxy_port
}
"
if
relative_url_root
=
Rails
.
application
.
config
.
relative_url_root
env
[
'SCRIPT_NAME'
]
=
""
env
[
'REQUEST_PATH'
].
sub!
(
/\A
#{
Regexp
.
escape
(
relative_url_root
)
}
/
,
''
)
...
...
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