diff --git a/lib/webpacker/dev_server_proxy.rb b/lib/webpacker/dev_server_proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/webpacker/dev_server_proxy.rb
+++ b/lib/webpacker/dev_server_proxy.rb
@@ -11,7 +11,9 @@ class Webpacker::DevServerProxy < Rack::Proxy
 
   def perform_request(env)
     if env["PATH_INFO"].start_with?("/#{public_output_uri_path}") && dev_server.running?
-      env["HTTP_HOST"] = env["HTTP_X_FORWARDED_HOST"] = env["HTTP_X_FORWARDED_SERVER"] = dev_server.host_with_port
+      env["HTTP_HOST"] = env["HTTP_X_FORWARDED_HOST"] = dev_server.host
+      env["HTTP_X_FORWARDED_SERVER"] = dev_server.host_with_port
+      env["HTTP_PORT"] = env["HTTP_X_FORWARDED_PORT"] = dev_server.port.to_s
       env["HTTP_X_FORWARDED_PROTO"] = env["HTTP_X_FORWARDED_SCHEME"] = dev_server.protocol
       unless dev_server.https?
         env["HTTPS"] = env["HTTP_X_FORWARDED_SSL"] = "off"
Fix incorrect host forwarding (#<I>)

Add missing port forwarding