wiki update

This commit is contained in:
k
2026-09-21 11:38:19 +02:00
parent 56628fa103
commit d05dad2e48
6 changed files with 40 additions and 2 deletions
+4
View File
@@ -37,6 +37,10 @@ export const config = {
openaiApiKey: env("OPENAI_API_KEY", ""),
openaiEnabled: envBool("OPENAI_ENABLED", false),
// Public docs wiki (served by the hosted git forge, e.g. Gitea wiki pages).
// The app redirects GET /wiki there (302) so the target stays configurable.
wikiUrl: env("WIKI_URL", "https://git.kisakay.com/k/chat/wiki"),
};
export function assertConfig(): void {
+5
View File
@@ -133,6 +133,11 @@ const server = Bun.serve({
});
}
// --- public: /wiki redirects to the remote docs wiki (git forge) ---
if ((path === "/wiki" || path === "/wiki/") && req.method === "GET") {
return Response.redirect(config.wikiUrl, 302);
}
// --- auth: login (rate limited) ---
if (path === "/api/auth/login" && req.method === "POST") {
const ip = clientIp(req, server);