Tighten Camino runtime auth enforcement

This commit is contained in:
Timothy J. Aveni
2026-07-12 15:12:26 -07:00
parent 300592d1b5
commit 601728c139
+5
View File
@@ -721,6 +721,11 @@ export const serveQuixosPackageRuntime = <
const port = Number(process.env.QUIXOS_RUNTIME_PORT ?? "0");
const caminoUrl = process.env.CAMINO_URL ?? "http://127.0.0.1:7310";
const runtimeToken = process.env.CAMINO_RUNTIME_AUTH_TOKEN ?? "";
if (process.env.CAMINO_RUNTIME_AUTH_REQUIRED === "1" && !runtimeToken) {
throw new Error(
"CAMINO_RUNTIME_AUTH_REQUIRED=1 but CAMINO_RUNTIME_AUTH_TOKEN is missing",
);
}
const runtimeTokenInterceptor: Interceptor = (next) => async (request) => {
if (runtimeToken) {
request.header.set("x-camino-runtime-token", runtimeToken);