From 57c5ef9da6d1415aeceb681756c68f2154126d41 Mon Sep 17 00:00:00 2001 From: shuaiplus <2327005759@qq.com> Date: Mon, 6 Jul 2026 22:56:36 +0800 Subject: [PATCH] Remove WEBSITE_ICONS_ENABLED and always enable website icons --- package.json | 3 --- src/router-public.ts | 2 +- src/types/index.ts | 1 - webapp/src/lib/app-auth.ts | 4 ++-- webapp/src/lib/demo.empty.ts | 2 +- webapp/src/lib/demo.ts | 2 +- webapp/src/lib/website-icon-settings.ts | 2 +- 7 files changed, 6 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index f331e20..e87be07 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,6 @@ }, "ATTACHMENTS_KV": { "description": "Optional KV namespace fallback for attachment/send-file storage" - }, - "WEBSITE_ICONS_ENABLED": { - "description": "Optional: set to true to proxy website icons via third-party icon services. Defaults to disabled for vault-domain privacy." } } }, diff --git a/src/router-public.ts b/src/router-public.ts index 3688282..7b28aef 100644 --- a/src/router-public.ts +++ b/src/router-public.ts @@ -50,7 +50,7 @@ export interface WebBootstrapResponse { } function isWebsiteIconProxyEnabled(env: Env): boolean { - return ['1', 'true', 'yes', 'on'].includes(String(env.WEBSITE_ICONS_ENABLED || '').trim().toLowerCase()); + return true; } function isSameOriginWriteRequest(request: Request): boolean { diff --git a/src/types/index.ts b/src/types/index.ts index 95a95f4..7865144 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -20,7 +20,6 @@ export interface Env { 'globalSettings__yubico__clientId'?: string; 'globalSettings__yubico__key'?: string; 'globalSettings__yubico__validationUrls'?: string; - WEBSITE_ICONS_ENABLED?: string; } export type UserRole = 'admin' | 'user'; diff --git a/webapp/src/lib/app-auth.ts b/webapp/src/lib/app-auth.ts index 1c325a5..65acbf3 100644 --- a/webapp/src/lib/app-auth.ts +++ b/webapp/src/lib/app-auth.ts @@ -236,7 +236,7 @@ function normalizeBootstrapResponse(boot: WebBootstrapResponse): Pick