From 12aeb84464472f8db1769cf236974b6bf3377aa4 Mon Sep 17 00:00:00 2001 From: Susana Cardoso Ferreira Date: Wed, 24 Jun 2026 11:14:16 +0000 Subject: [PATCH] fix(enterprise/aibridgeproxyd): stop injecting default port into forwarded Host header The proxy normalized CoderAccessURL.Host to always include the default port (e.g. coder.example.com:443). This leaked into the Host header of every request forwarded to the Coder server. When redirectToAccessURL was enabled, the middleware compared the Host header against the access URL literally, saw a mismatch, and redirected to the SPA root. Copilot then received HTML instead of JSON: Failed to load custom agents: SyntaxError: Unexpected token '<', "