feat: add TITLE in worker for custom website title (#276)

This commit is contained in:
Dream Hunter
2024-05-26 16:21:27 +08:00
committed by GitHub
parent 268f3d6446
commit 1f8edbc295
14 changed files with 93 additions and 10 deletions

View File

@@ -15,6 +15,7 @@ api.get('/open_api/settings', async (c) => {
needAuth = !auth || !passwords.includes(auth);
}
return c.json({
"title": c.env.TITLE,
"prefix": c.env.PREFIX,
"domains": getDomains(c),
"needAuth": needAuth,

View File

@@ -6,6 +6,7 @@ export type Bindings = {
SEND_MAIL: any
// config
TITLE: string | undefined
PREFIX: string | undefined
DOMAINS: string | string[] | undefined
PASSWORDS: string | string[] | undefined