pc 프로그램 다운로드 기능 적용
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { DESKTOP_API_BASE, setApiBase } from '@goldenchart/shared';
|
||||
|
||||
/** Tauri desktop — 항상 https exdev (localhost·http 금지) */
|
||||
/** Tauri desktop — 항상 exdev 서버 (localhost 금지) */
|
||||
export function ensureDesktopApiBase(): void {
|
||||
setApiBase(DESKTOP_API_BASE);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { ensureDesktopApiBase } from './ensureDesktopApiBase';
|
||||
import { installTauriHttp } from './installTauriHttp';
|
||||
|
||||
/** App·backendApi import 전 API base 고정 (localhost 금지) */
|
||||
/** App·backendApi import 전 API base 고정 + 네이티브 HTTP */
|
||||
ensureDesktopApiBase();
|
||||
installTauriHttp();
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { fetch as tauriFetch } from '@tauri-apps/plugin-http';
|
||||
import { setHttpFetch } from '@goldenchart/shared';
|
||||
|
||||
/** WebView fetch(ATS/CORS) 대신 Rust reqwest — exdev HTTP API */
|
||||
export function installTauriHttp(): void {
|
||||
setHttpFetch(tauriFetch);
|
||||
}
|
||||
Reference in New Issue
Block a user