diff --git a/lib/webpacker/dev_server_proxy.rb b/lib/webpacker/dev_server_proxy.rb index 67f548287..ed73ebac0 100644 --- a/lib/webpacker/dev_server_proxy.rb +++ b/lib/webpacker/dev_server_proxy.rb @@ -11,7 +11,10 @@ def rewrite_response(response) def perform_request(env) if env["PATH_INFO"].start_with?("/#{public_output_uri_path}") && Webpacker.dev_server.running? env["HTTP_HOST"] = env["HTTP_X_FORWARDED_HOST"] = env["HTTP_X_FORWARDED_SERVER"] = Webpacker.dev_server.host_with_port - env["HTTP_X_FORWARDED_PROTO"] = Webpacker.dev_server.protocol + env["HTTP_X_FORWARDED_PROTO"] = env["HTTP_X_FORWARDED_SCHEME"] = Webpacker.dev_server.protocol + unless Webpacker.dev_server.https? + env["HTTPS"] = env["HTTP_X_FORWARDED_SSL"] = "off" + end env["SCRIPT_NAME"] = "" super(env)