mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-06-13 11:30:29 +08:00
feat: add MIN_ADDRESS_LEN && MAX_ADDRESS_LEN (#304)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Hono } from 'hono'
|
||||
|
||||
import { getDomains, getPasswords, getBooleanValue } from './utils';
|
||||
import { getDomains, getPasswords, getBooleanValue, getIntValue } from './utils';
|
||||
import { CONSTANTS } from './constants';
|
||||
import { HonoCustomType } from './types';
|
||||
import { isS3Enabled } from './mails_api/s3_attachment';
|
||||
@@ -18,6 +18,8 @@ api.get('/open_api/settings', async (c) => {
|
||||
return c.json({
|
||||
"title": c.env.TITLE,
|
||||
"prefix": c.env.PREFIX,
|
||||
"minAddressLen": getIntValue(c.env.MIN_ADDRESS_LEN, 1),
|
||||
"maxAddressLen": getIntValue(c.env.MAX_ADDRESS_LEN, 30),
|
||||
"domains": getDomains(c),
|
||||
"needAuth": needAuth,
|
||||
"adminContact": c.env.ADMIN_CONTACT,
|
||||
|
||||
Reference in New Issue
Block a user