BigW Consortium Gitlab

move dev server middleware to new namespace

parent f65a1da0
...@@ -34,7 +34,7 @@ if app.config.serve_static_files ...@@ -34,7 +34,7 @@ if app.config.serve_static_files
) )
app.config.middleware.insert_before( app.config.middleware.insert_before(
Gitlab::Middleware::Static, Gitlab::Middleware::Static,
Gitlab::Middleware::WebpackProxy, Gitlab::Webpack::DevServerMiddleware,
proxy_path: app.config.webpack.public_path, proxy_path: app.config.webpack.public_path,
proxy_host: dev_server.host, proxy_host: dev_server.host,
proxy_port: dev_server.port proxy_port: dev_server.port
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
# :nocov: # :nocov:
module Gitlab module Gitlab
module Middleware module Webpack
class WebpackProxy < Rack::Proxy class DevServerMiddleware < Rack::Proxy
def initialize(app = nil, opts = {}) def initialize(app = nil, opts = {})
@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)
......
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