@inflector/aura 0.8.5 → 0.8.7
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 +9 -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,kBA0ExB"}
|
package/dist/bin.js
CHANGED
|
@@ -592,6 +592,15 @@ export async function dev() {
|
|
|
592
592
|
if (req.headers.cookie) {
|
|
593
593
|
proxyReq.setHeader("Cookie", req.headers.cookie);
|
|
594
594
|
}
|
|
595
|
+
// Tell the backend the public-facing host so Better Auth
|
|
596
|
+
// builds OAuth callback URLs pointing to localhost, not the upstream host
|
|
597
|
+
const vitePort = userConfig?.server?.port ?? 5173;
|
|
598
|
+
const publicHost = `localhost:${vitePort}`;
|
|
599
|
+
proxyReq.setHeader("x-forwarded-host", publicHost);
|
|
600
|
+
proxyReq.setHeader("x-forwarded-proto", "http");
|
|
601
|
+
proxyReq.setHeader("origin", `http://${publicHost}`);
|
|
602
|
+
proxyReq.setHeader("x-aura-public-host", publicHost);
|
|
603
|
+
proxyReq.setHeader("x-aura-public-proto", "http");
|
|
595
604
|
});
|
|
596
605
|
proxy.on("proxyRes", (proxyRes) => {
|
|
597
606
|
const cookies = proxyRes.headers["set-cookie"];
|