Implement two-layer CAPTCHA bypass

This commit is contained in:
gpt-engineer-app[bot]
2025-10-11 00:41:13 +00:00
parent c986a54fbf
commit 21acbb948c
7 changed files with 112 additions and 5 deletions

View File

@@ -78,6 +78,12 @@ export function useAdminSettings() {
return settings?.filter(s => s.category === category) || [];
};
const getCaptchaBypassEnabled = (): boolean => {
const value = getSettingValue('auth.captcha_bypass_enabled', 'false');
const cleanValue = typeof value === 'string' ? value.replace(/"/g, '') : value;
return cleanValue === 'true' || cleanValue === true;
};
const updateSetting = async (key: string, value: any) => {
return updateSettingMutation.mutateAsync({ key, value });
};
@@ -179,5 +185,6 @@ export function useAdminSettings() {
getAutoRefreshStrategy,
getPreserveInteractionState,
getUseRealtimeQueue,
getCaptchaBypassEnabled,
};
}