@vellumai/cli 0.10.11-dev.202607212222.fe33210 → 0.10.11-dev.202607220045.1864bb9
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/package.json
CHANGED
|
@@ -59,6 +59,13 @@ describe("buildIngressNginxConfig", () => {
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
+
test("emits relative redirects so a fronting proxy keeps scheme and port", () => {
|
|
63
|
+
for (const config of [conf, remoteConf]) {
|
|
64
|
+
expect(config).toContain("absolute_redirect off;");
|
|
65
|
+
expect(config).toContain("port_in_redirect off;");
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
62
69
|
test("proxies requests to the gateway", () => {
|
|
63
70
|
expect(conf).toContain("location / {");
|
|
64
71
|
expect(conf).toContain("proxy_pass http://127.0.0.1:7830;");
|
package/src/lib/nginx-ingress.ts
CHANGED
|
@@ -230,6 +230,13 @@ http {
|
|
|
230
230
|
listen 127.0.0.1:${opts.listenPort};
|
|
231
231
|
client_max_body_size 512m;
|
|
232
232
|
|
|
233
|
+
# This edge sits behind a TLS-terminating front (tunnel or tailscale serve),
|
|
234
|
+
# so redirects must be relative: emit "Location: /assistant/" and let the
|
|
235
|
+
# client resolve it against the origin it used, rather than an absolute URL
|
|
236
|
+
# built from nginx's own loopback scheme and port.
|
|
237
|
+
absolute_redirect off;
|
|
238
|
+
port_in_redirect off;
|
|
239
|
+
|
|
233
240
|
${serverLocations}
|
|
234
241
|
}
|
|
235
242
|
}
|