Commit 8f580fd9 authored by Stan Hu's avatar Stan Hu

Fix Webpack not working over HTTPS in development

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42485 broke
Webpack manifest loading when HTTPS was used in development. The GET
request for `/assets/webpack/manifest.json` is proxied through the Rails
server, but it was previously failing because it was making an HTTP
request to an HTTPS port. We fix this by enabling HTTPS in this GET
request if GitLab Rails is using HTTPS.
parent 57c574fc
......@@ -25,10 +25,12 @@ if app.config.public_file_server.enabled
}
if Rails.env.development?
# /assets are proxied through a Rails middlware to the Webpack
# server, so we have to use the local Rails settings.
settings.merge!(
host: Gitlab.config.gitlab.host,
port: Gitlab.config.gitlab.port,
https: false
https: Gitlab.config.gitlab.https
)
app.config.middleware.insert_before(
Gitlab::Middleware::Static,
......
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