feat: publish videoplayback proxy location on /info
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m17s

This commit is contained in:
Fijxu 2025-02-28 18:07:04 -03:00
parent 9ff358c364
commit 9512877ff2
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
2 changed files with 24 additions and 0 deletions

View file

@ -9,6 +9,7 @@ import invidiousRouteDashManifest from "./invidious_routes/dashManifest.ts";
import videoPlaybackProxy from "./videoPlaybackProxy.ts";
import metrics from "metrics";
import health from "./health.ts";
import info from "./info.ts"
export const routes = (
app: Hono,
@ -30,4 +31,6 @@ export const routes = (
app.route("/videoplayback", videoPlaybackProxy);
app.route("/metrics", metrics);
app.route("/healthz", health);
app.route("/info", info);
};

21
src/routes/info.ts Normal file
View file

@ -0,0 +1,21 @@
import { Hono } from "hono";
const info = new Hono();
info.get("/", (c) => {
const konfigStore = c.get("konfigStore");
const json = {
"external_videoplayback_proxy":
Deno.env.get("EXTERNAL_VIDEOPLAYBACK_PROXY") ||
konfigStore.get(
"networking.external_videoplayback_proxy",
) as string,
};
return new Response(JSON.stringify(json), {
status: 200,
headers: { "Content-Type": "application/json" },
});
});
export default info;