mirror of
https://github.com/beilunyang/moemail.git
synced 2025-12-24 11:30:51 +08:00
fix(turnstile): conditionally include secretKey in Turnstile configuration based on management permissions
This commit is contained in:
@@ -32,11 +32,11 @@ export async function GET() {
|
||||
emailDomains: emailDomains || "moemail.app",
|
||||
adminContact: adminContact || "",
|
||||
maxEmails: maxEmails || EMAIL_CONFIG.MAX_ACTIVE_EMAILS.toString(),
|
||||
turnstile: {
|
||||
turnstile: canManageConfig ? {
|
||||
enabled: turnstileEnabled === "true",
|
||||
siteKey: turnstileSiteKey || "",
|
||||
...(canManageConfig ? { secretKey: turnstileSecretKey || "" } : {})
|
||||
}
|
||||
secretKey: turnstileSecretKey || "",
|
||||
} : undefined
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user