fix: harden auth, config access, and backups

This commit is contained in:
sagitchu
2026-05-13 23:53:06 +08:00
parent ec9fb77eb5
commit 465815cf34
28 changed files with 1376 additions and 97 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import { Button } from "@/shadcn-bridge/heroui/button";
import { siteConfig } from "@/config/site";
import { VersionFooter } from "@/components/version-footer";
import { BrandLogo } from "@/components/brand-logo";
import { login, LoginData, checkCaptcha, getConfigByName } from "@/api";
import { login, LoginData, checkCaptcha, getPublicConfigByName } from "@/api";
import { writeLoginSession } from "@/utils/session";
import { useWebViewMode } from "@/hooks/useWebViewMode";
@@ -128,7 +128,7 @@ export default function IndexPage() {
if (checkResponse.data === 0) {
await performLogin();
} else {
const configResp = await getConfigByName("cloudflare_site_key");
const configResp = await getPublicConfigByName("cloudflare_site_key");
if (configResp.code === 0 && configResp.data && configResp.data.value) {
setSiteKey(configResp.data.value);