feat: |Worker| add var DEFAULT_LANG, zh/en (#585)

This commit is contained in:
Dream Hunter
2025-02-20 00:42:48 +08:00
committed by GitHub
parent 7889d2edea
commit 6c334d32f6
4 changed files with 4 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import { isS3Enabled } from '../mails_api/s3_attachment';
export default {
getConfig: async (c: Context<HonoCustomType>) => {
return c.json({
"DEFAULT_LANG": c.env.DEFAULT_LANG,
"TITLE": c.env.TITLE,
"HAS_PASSWORD": getPasswords(c).length,
"HAS_ADMIN_PASSWORDS": getAdminPasswords(c).length,

View File

@@ -16,6 +16,7 @@ compatibility_flags = [ "nodejs_compat" ]
# ]
[vars]
# DEFAULT_LANG = "zh"
# TITLE = "Custom Title" # custom title
# ANNOUNCEMENT = "Custom Announcement"
PREFIX = "tmp"