@inflector/aura 0.8.2 → 0.8.3
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/bin.d.ts.map +1 -1
- package/dist/bin.js +24 -0
- package/package.json +1 -1
package/dist/bin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AA6JA,wBAAgB,KAAK,CAAC,MAAM,UAAQ,QA4CnC;AAiWD,wBAAsB,GAAG,
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AA6JA,wBAAgB,KAAK,CAAC,MAAM,UAAQ,QA4CnC;AAiWD,wBAAsB,GAAG,kBA4DxB"}
|
package/dist/bin.js
CHANGED
|
@@ -588,6 +588,15 @@ export async function dev() {
|
|
|
588
588
|
proxyReq.setHeader("Authorization", `Bearer ${AURA_KEY}`);
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
|
+
proxy.on("proxyRes", (proxyRes) => {
|
|
592
|
+
const cookies = proxyRes.headers["set-cookie"];
|
|
593
|
+
if (cookies) {
|
|
594
|
+
proxyRes.headers["set-cookie"] = cookies.map((cookie) => cookie
|
|
595
|
+
.replace(/;\s*Domain=[^;]*/gi, "")
|
|
596
|
+
.replace(/;\s*Secure/gi, "")
|
|
597
|
+
.replace(/;\s*SameSite=None/gi, "; SameSite=Lax"));
|
|
598
|
+
}
|
|
599
|
+
});
|
|
591
600
|
},
|
|
592
601
|
},
|
|
593
602
|
},
|
|
@@ -647,6 +656,21 @@ async function start() {
|
|
|
647
656
|
const proxyHeaders = new Headers(proxiedResp.headers);
|
|
648
657
|
proxyHeaders.delete("content-encoding");
|
|
649
658
|
proxyHeaders.delete("content-length");
|
|
659
|
+
const rawCookies = [];
|
|
660
|
+
proxiedResp.headers.forEach((value, key) => {
|
|
661
|
+
if (key.toLowerCase() === "set-cookie")
|
|
662
|
+
rawCookies.push(value);
|
|
663
|
+
});
|
|
664
|
+
if (rawCookies.length > 0) {
|
|
665
|
+
proxyHeaders.delete("set-cookie");
|
|
666
|
+
rawCookies.forEach((cookie) => {
|
|
667
|
+
const cleaned = cookie
|
|
668
|
+
.replace(/;\s*Domain=[^;]*/gi, "")
|
|
669
|
+
.replace(/;\s*Secure/gi, "")
|
|
670
|
+
.replace(/;\s*SameSite=None/gi, "; SameSite=Lax");
|
|
671
|
+
proxyHeaders.append("set-cookie", cleaned);
|
|
672
|
+
});
|
|
673
|
+
}
|
|
650
674
|
return new Response(proxiedResp.body, {
|
|
651
675
|
status: proxiedResp.status,
|
|
652
676
|
statusText: proxiedResp.statusText,
|