mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-07 08:27:08 +08:00
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:
@@ -125,7 +125,7 @@ api.post('/api/new_address', async (c) => {
|
||||
}
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
let { name, domain, cf_token } = await c.req.json();
|
||||
let { name, domain, cf_token, enableRandomSubdomain } = await c.req.json();
|
||||
// check cf turnstile
|
||||
try {
|
||||
await checkCfTurnstile(c, cf_token);
|
||||
@@ -160,6 +160,7 @@ api.post('/api/new_address', async (c) => {
|
||||
const res = await newAddress(c, {
|
||||
name, domain,
|
||||
enablePrefix: true,
|
||||
enableRandomSubdomain: getBooleanValue(enableRandomSubdomain),
|
||||
checkLengthByConfig: true,
|
||||
addressPrefix,
|
||||
sourceMeta
|
||||
|
||||
Reference in New Issue
Block a user