Investigate login/signup failure
Investigate and address the "Failed to fetch" error during signup and login failures.
This commit is contained in:
@@ -23,8 +23,8 @@ const SupabaseSettingsForm: React.FC<SupabaseSettingsFormProps> = ({ onSaved })
|
||||
const [formState, setFormState] = useState({
|
||||
supabaseUrl: '',
|
||||
supabaseKey: '',
|
||||
useProxy: false,
|
||||
proxyType: 'corsproxy.io',
|
||||
useProxy: true, // 기본값을 true로 변경
|
||||
proxyType: 'cloudflare', // 기본값을 cloudflare로 변경
|
||||
isSaving: false
|
||||
});
|
||||
|
||||
@@ -37,15 +37,15 @@ const SupabaseSettingsForm: React.FC<SupabaseSettingsFormProps> = ({ onSaved })
|
||||
useEffect(() => {
|
||||
const savedUrl = localStorage.getItem('supabase_url');
|
||||
const savedKey = localStorage.getItem('supabase_key');
|
||||
const proxyEnabled = isCorsProxyEnabled();
|
||||
const proxyEnabled = localStorage.getItem('use_cors_proxy') === 'true';
|
||||
const savedProxyType = getProxyType();
|
||||
|
||||
setFormState(prev => ({
|
||||
...prev,
|
||||
supabaseUrl: savedUrl || '',
|
||||
supabaseKey: savedKey || '',
|
||||
useProxy: proxyEnabled,
|
||||
proxyType: savedProxyType
|
||||
useProxy: proxyEnabled === false ? false : true, // 저장된 값이 명시적으로 false인 경우에만 false, 아니면 기본값 true
|
||||
proxyType: savedProxyType || 'cloudflare'
|
||||
}));
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user