Commit 5a099315 authored by Mike Greiling's avatar Mike Greiling

disable webpack proxy in rspec environment due to conflicts with webmock gem

parent deb2fa20
...@@ -16,15 +16,20 @@ if app.config.serve_static_files ...@@ -16,15 +16,20 @@ if app.config.serve_static_files
# If webpack-dev-server is configured, proxy webpack's public directory # If webpack-dev-server is configured, proxy webpack's public directory
# instead of looking for static assets # instead of looking for static assets
if Gitlab.config.webpack.dev_server.enabled if Gitlab.config.webpack.dev_server.enabled
app.config.webpack.dev_server.merge!( dev_server = {
enabled: true, enabled: true,
host: Gitlab.config.webpack.dev_server.host,
port: Gitlab.config.webpack.dev_server.port,
manifest_host: Gitlab.config.webpack.dev_server.host,
manifest_port: Gitlab.config.webpack.dev_server.port,
}
if Rails.env.development?
dev_server.merge!(
host: Gitlab.config.gitlab.host, host: Gitlab.config.gitlab.host,
port: Gitlab.config.gitlab.port, port: Gitlab.config.gitlab.port,
https: Gitlab.config.gitlab.https, https: Gitlab.config.gitlab.https,
manifest_host: Gitlab.config.webpack.dev_server.host,
manifest_port: Gitlab.config.webpack.dev_server.port,
) )
app.config.middleware.insert_before( app.config.middleware.insert_before(
Gitlab::Middleware::Static, Gitlab::Middleware::Static,
Gitlab::Middleware::WebpackProxy, Gitlab::Middleware::WebpackProxy,
...@@ -33,4 +38,7 @@ if app.config.serve_static_files ...@@ -33,4 +38,7 @@ if app.config.serve_static_files
proxy_port: Gitlab.config.webpack.dev_server.port, proxy_port: Gitlab.config.webpack.dev_server.port,
) )
end end
app.config.webpack.dev_server.merge!(dev_server)
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment