Serve proxied provider surfaces over HTTP
This commit is contained in:
parent
ec13215046
commit
6dd6fdcf0e
1 changed files with 7 additions and 0 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue