@@ -62,15 +62,15 @@ func normalizeNodeIP(nodeIP string) (string, error) {
6262 return nodeIP , nil
6363}
6464
65- func legacySandboxHostForEnvdRequest (host string , sandboxID string , port uint64 ) * string {
65+ func orchestratorSandboxHost (host string , sandboxID string , port uint64 ) * string {
6666 hostname := strings .Split (host , ":" )[0 ]
6767 domain , ok := strings .CutPrefix (hostname , "envd." )
6868 if ! ok || domain == "" {
6969 return nil
7070 }
7171
72- legacyHost := fmt .Sprintf ("%d-%s.%s" , port , sandboxID , domain )
73- return & legacyHost
72+ host := fmt .Sprintf ("%d-%s.%s" , port , sandboxID , domain )
73+ return & host
7474}
7575
7676func catalogResolution (ctx context.Context , sandboxId string , sandboxPort uint64 , trafficAccessToken string , envdAccessToken string , c catalog.SandboxesCatalog , pausedChecker PausedSandboxResumer , featureFlags * featureflags.Client ) (string , error ) {
@@ -143,7 +143,7 @@ func handlePausedSandbox(
143143}
144144
145145func NewClientProxy (meterProvider metric.MeterProvider , serviceName string , port uint16 , catalog catalog.SandboxesCatalog , pausedSandboxResumer PausedSandboxResumer , featureFlagsClient * featureflags.Client ) (* reverseproxy.Proxy , error ) {
146- getTargetFromRequest := reverseproxy .GetTargetFromRequest (true )
146+ getTargetFromRequest := reverseproxy .GetTargetFromRequest (reverseproxy . HeaderRoutingEnabled )
147147 proxy := reverseproxy .New (
148148 port ,
149149 // Retries that are needed to handle port forwarding delays in sandbox envd are handled by the orchestrator proxy
@@ -208,7 +208,7 @@ func NewClientProxy(meterProvider metric.MeterProvider, serviceName string, port
208208 SandboxPort : port ,
209209 ConnectionKey : pool .ClientProxyConnectionKey ,
210210 Url : url ,
211- MaskRequestHost : legacySandboxHostForEnvdRequest (
211+ MaskRequestHost : orchestratorSandboxHost (
212212 r .Host ,
213213 sandboxId ,
214214 port ,
0 commit comments