Serve proxied provider surfaces over HTTP

This commit is contained in:
Meta Vens 2026-06-06 15:21:23 +01:00
commit 6dd6fdcf0e

View file

@ -30,6 +30,13 @@ function handleHttp(req, res, getCurrentState, getHealth) {
return;
}
const providerId = providerIdFromDeckUrl(req.url);
if (providerId) {
res.writeHead(200, { "content-type": "application/json" });
res.end(JSON.stringify(stateForRequest(currentState, req.url)));
return;
}
res.writeHead(404, { "content-type": "text/plain" });
res.end("not found");
}