feat(legal): serve Terms of Service and Privacy Policy pages

Add bilingual (zh/en) /terms and /privacy pages served by the Worker for
configuring the Discord application's Terms of Service and Privacy Policy
URLs. Contact line is configurable via optional LEGAL_CONTACT env var.
This commit is contained in:
RhenCloud committed 2026-08-02 07:12:54 +08:00
1 parent fcf3413634
commit 225d5b015e
3 files changed
+250

No files matched your search

+2
View File
@@ -5,6 +5,7 @@ import { dispatchEvent } from "./discord";
import { createOAuthRoutes } from "./oauth-routes";
import { createActionRoutes } from "./action-routes";
import { createAdminRoutes } from "./admin-routes";
import { createLegalRoutes } from "./legal-routes";
import { log } from "./log";
const MAX_BODY_SIZE = 1024 * 1024;
@@ -16,6 +17,7 @@ export function createServer(): Hono<{ Bindings: Env }> {
app.route("/auth", createOAuthRoutes());
app.route("/", createActionRoutes());
app.route("/", createLegalRoutes());
app.route("/admin", createAdminRoutes());
app.post("/webhook", async (c) => {