@standardagents/builder 0.18.1 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugin.js CHANGED
@@ -7333,6 +7333,12 @@ function addCorsHeaders(response) {
7333
7333
  return response;
7334
7334
  }
7335
7335
 
7336
+ // Preserve Set-Cookie exactly. Rebuilding a Response from response.headers can
7337
+ // drop cookie headers in Worker runtimes because Set-Cookie is special.
7338
+ if (response.headers.has("Set-Cookie")) {
7339
+ return response;
7340
+ }
7341
+
7336
7342
  // Skip if already has CORS headers
7337
7343
  if (response.headers.has("Access-Control-Allow-Origin")) {
7338
7344
  return response;