diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-02-27 18:17:02 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-02-27 18:17:02 +0000 |
commit | 879ef798eeca8252aa7c508c19437b2b8a142e11 (patch) | |
tree | e93b2b23de96e8e4924a3748befe0661de04fdaf | |
parent | 47417f72f89f3a59c02838fae8306bb95cdab180 (diff) | |
download | gitlab-ce-revert-34685c58.tar.gz |
Revert "Merge branch 'fix-webpack-dev-server-proxy' into 'master'"revert-34685c58
This reverts merge request !9543
-rw-r--r-- | lib/gitlab/middleware/webpack_proxy.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/middleware/webpack_proxy.rb b/lib/gitlab/middleware/webpack_proxy.rb index cb60c5f96ba..3fe32adeade 100644 --- a/lib/gitlab/middleware/webpack_proxy.rb +++ b/lib/gitlab/middleware/webpack_proxy.rb @@ -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, backend: "http://#{proxy_host}:#{proxy_port}", **opts) + super(app, opts) end def perform_request(env) - if @proxy_path && env['PATH_INFO'].start_with?("/#{@proxy_path}") - super(env) - else - @app.call(env) + unless @proxy_path && env['PATH_INFO'].start_with?("/#{@proxy_path}") + return @app.call(env) end + + env['HTTP_HOST'] = "#{@proxy_host}:#{@proxy_port}" + super(env) end end end |