diff --git a/internal/dev-entrypoint/cloud-web-proxy.mjs b/internal/dev-entrypoint/cloud-web-proxy.mjs index aa27a688..ed9589a0 100644 --- a/internal/dev-entrypoint/cloud-web-proxy.mjs +++ b/internal/dev-entrypoint/cloud-web-proxy.mjs @@ -6,6 +6,7 @@ const STREAMING_HEADER_DEFAULTS = Object.freeze({ }); const FORWARDED_REQUEST_HEADERS = Object.freeze([ + "authorization", "cookie", "prefer", "x-hwlab-short-connection", diff --git a/internal/dev-entrypoint/cloud-web-proxy.test.mjs b/internal/dev-entrypoint/cloud-web-proxy.test.mjs index 7739d7b9..41076d6f 100644 --- a/internal/dev-entrypoint/cloud-web-proxy.test.mjs +++ b/internal/dev-entrypoint/cloud-web-proxy.test.mjs @@ -18,7 +18,7 @@ test("cloud web proxy preserves Code Agent short-connection headers", () => { "x-trace-id": "trc_proxy_short_connection", "x-request-id": "req_proxy_short_connection", cookie: "hwlab_session=must-forward", - authorization: "Bearer must-not-forward" + authorization: "Bearer hwl_live_must-forward" } }, "{\"message\":\"hello\"}"); @@ -29,7 +29,7 @@ test("cloud web proxy preserves Code Agent short-connection headers", () => { assert.equal(headers["x-trace-id"], "trc_proxy_short_connection"); assert.equal(headers["x-request-id"], "req_proxy_short_connection"); assert.equal(headers.cookie, "hwlab_session=must-forward"); - assert.equal(headers.authorization, undefined); + assert.equal(headers.authorization, "Bearer hwl_live_must-forward"); assert.equal(headers["content-length"], Buffer.byteLength("{\"message\":\"hello\"}")); });