Skip to content

Commit 4bd4054

Browse files
committed
fix: avoid minio endpoint fallback for cos
1 parent bd54cc0 commit 4bd4054

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib/storage/config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ export function getStorageConfigFromEnv(env: NodeJS.ProcessEnv = process.env): S
3232

3333
if (type === 'cos') {
3434
const useSSL = parseBool(env.COS_USE_SSL ?? env.STORAGE_USE_SSL, true);
35+
const domain = cleanDomain(env.COS_DOMAIN || env.STORAGE_DOMAIN);
3536
return {
3637
type,
37-
endpoint: cleanDomain(env.COS_DOMAIN ?? env.STORAGE_ENDPOINT),
38-
domain: cleanDomain(env.COS_DOMAIN ?? env.STORAGE_DOMAIN),
38+
endpoint: domain,
39+
domain,
3940
useSSL,
4041
accessKey: env.COS_SECRET_ID || env.STORAGE_ACCESS_KEY || '',
4142
secretKey: env.COS_SECRET_KEY || env.STORAGE_SECRET_KEY || '',

0 commit comments

Comments
 (0)