fix: 修复S3备份下载URL生成逻辑并导出API基础URL函数
- 导出`getApiBaseUrl`函数以便复用 - 修改`downloadS3BackupUrl`函数,使其使用正确的API基础URL - 重构S3备份下载处理,使用fetch API并添加授权头,支持blob下载
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const rawEnvApiBaseUrl = (import.meta.env.VITE_API_BASE_URL || '').trim();
|
||||
|
||||
function getApiBaseUrl(): string {
|
||||
export function getApiBaseUrl(): string {
|
||||
const stored = (localStorage.getItem('cwd_admin_api_base_url') || '').trim();
|
||||
const source = stored || rawEnvApiBaseUrl;
|
||||
const apiBaseUrl = source.replace(/\/+$/, '');
|
||||
|
||||
Reference in New Issue
Block a user