@norskvideo/ctl-dev-kit 0.2.125 → 0.2.126
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.
|
@@ -86,6 +86,11 @@ export async function startInstanceProxy(opts) {
|
|
|
86
86
|
return ok ? undefined : new Response("ws upgrade failed", { status: 400 });
|
|
87
87
|
}
|
|
88
88
|
const headers = new Headers(req.headers);
|
|
89
|
+
// Studio refuses a browser write whose Origin is not the host it was
|
|
90
|
+
// reached at (id3as/norsk-studio#328). The browser reached this proxy, so
|
|
91
|
+
// say so, as a real reverse proxy would; otherwise a non-loopback upstream
|
|
92
|
+
// (direct mode, <id>-studio-1:8000) sees every dashboard POST as foreign.
|
|
93
|
+
headers.set("x-forwarded-host", req.headers.get("host") ?? u.host);
|
|
89
94
|
headers.delete("host");
|
|
90
95
|
const body = req.method === "GET" || req.method === "HEAD" ? undefined : await req.arrayBuffer();
|
|
91
96
|
// Studio being briefly unreachable is ordinary while a guide polls it; a
|