feat(subdomain): add random second-level mailbox support (#924)

Summary: add random second-level subdomain mailbox creation for web, admin, and
  Telegram.

Scope: worker config, UI toggle, and README/VitePress documentation.

Co-authored-by: wufei <fwu@creams.io>
This commit is contained in:
tsymr
2026-04-02 23:13:10 +08:00
committed by GitHub
co-authored by wufei
parent be1bf71a47
commit db93828a81
24 changed files with 273 additions and 57 deletions
+8
View File
@@ -150,6 +150,13 @@ export const getDomains = (c: Context<HonoCustomType>): string[] => {
return c.env.DOMAINS;
}
export const getRandomSubdomainDomains = (c: Context<HonoCustomType>): string[] => {
if (!c.env.RANDOM_SUBDOMAIN_DOMAINS) {
return [];
}
return getStringArray(c.env.RANDOM_SUBDOMAIN_DOMAINS);
}
export const getUserRoles = (c: Context<HonoCustomType>): UserRole[] => {
if (!c.env.USER_ROLES) {
return [];
@@ -368,6 +375,7 @@ export default {
getStringArray,
getDefaultDomains,
getDomains,
getRandomSubdomainDomains,
getUserRoles,
getAnotherWorkerList,
getPasswords,