fix(app): 앱 설치 페이지 ITSM 엔드포인트 :8443→itsm.zioinfo.co.kr (연결 거부 해결) + 응답 URL 치환

This commit is contained in:
GUARDiA 2026-06-13 21:33:46 +09:00
parent 6105f04d36
commit bb76b0b929
4 changed files with 114 additions and 110 deletions

View File

@ -12,7 +12,7 @@
href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap" href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap"
rel="stylesheet" rel="stylesheet"
/> />
<script type="module" crossorigin src="/assets/index-BpKe6Yxq.js"></script> <script type="module" crossorigin src="/assets/index-C1zhKYFu.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CrOT_Ttv.css"> <link rel="stylesheet" crossorigin href="/assets/index-CrOT_Ttv.css">
</head> </head>
<body> <body>

View File

@ -2,7 +2,9 @@ import { useEffect, useState } from 'react'
import { Smartphone, Download, Copy, Check, ExternalLink, RefreshCw } from 'lucide-react' import { Smartphone, Download, Copy, Check, ExternalLink, RefreshCw } from 'lucide-react'
// 중앙 APK 저장소(ITSM)의 공개 엔드포인트 — 매장/대표 관리자앱(읽기전용). 업로드는 Manager 일원화. // 중앙 APK 저장소(ITSM)의 공개 엔드포인트 — 매장/대표 관리자앱(읽기전용). 업로드는 Manager 일원화.
const ITSM_APP_BASE = 'https://zioinfo.co.kr:8443' // :8443은 외부 비공개 → itsm 서브도메인(nginx 443) 사용. 응답 내 URL의 :8443도 동일 치환.
const ITSM_APP_BASE = 'https://itsm.zioinfo.co.kr'
const fixUrl = (u?: string) => u?.replace(/https?:\/\/zioinfo\.co\.kr:8443/g, ITSM_APP_BASE)
interface AppInfo { interface AppInfo {
has_version: boolean; app_name?: string; version?: string; platform?: string has_version: boolean; app_name?: string; version?: string; platform?: string
@ -19,7 +21,7 @@ export default function AdminApp() {
const load = () => { const load = () => {
setLoading(true); setErr('') setLoading(true); setErr('')
fetch(`${ITSM_APP_BASE}/api/app/public-latest`) fetch(`${ITSM_APP_BASE}/api/app/public-latest`)
.then(r => r.json()).then((d: AppInfo) => setInfo(d)) .then(r => r.json()).then((d: AppInfo) => setInfo({ ...d, qr_url: fixUrl(d.qr_url), landing_url: fixUrl(d.landing_url), download_url: fixUrl(d.download_url) }))
.catch(() => setErr('중앙 앱 저장소(ITSM)에 연결할 수 없습니다.')) .catch(() => setErr('중앙 앱 저장소(ITSM)에 연결할 수 없습니다.'))
.finally(() => setLoading(false)) .finally(() => setLoading(false))
} }

View File

@ -2,7 +2,9 @@ import { useEffect, useState } from 'react'
import { Smartphone, Download, Copy, Check, ExternalLink, RefreshCw, Flower2 } from 'lucide-react' import { Smartphone, Download, Copy, Check, ExternalLink, RefreshCw, Flower2 } from 'lucide-react'
// 중앙 APK 저장소(ITSM)의 공개 엔드포인트 — 인증 불필요·CORS 허용. 업로드는 Manager 일원화(읽기전용 표시). // 중앙 APK 저장소(ITSM)의 공개 엔드포인트 — 인증 불필요·CORS 허용. 업로드는 Manager 일원화(읽기전용 표시).
const ITSM_APP_BASE = 'https://zioinfo.co.kr:8443' // :8443은 외부 비공개 → itsm 서브도메인(nginx 443) 사용. 응답 내 URL의 :8443도 동일 치환.
const ITSM_APP_BASE = 'https://itsm.zioinfo.co.kr'
const fixUrl = (u?: string) => u?.replace(/https?:\/\/zioinfo\.co\.kr:8443/g, ITSM_APP_BASE)
interface AppInfo { interface AppInfo {
has_version: boolean; app_name?: string; version?: string; platform?: string has_version: boolean; app_name?: string; version?: string; platform?: string
@ -20,7 +22,7 @@ export default function CustomerApp() {
setLoading(true); setErr('') setLoading(true); setErr('')
fetch(`${ITSM_APP_BASE}/api/app/public-latest`) fetch(`${ITSM_APP_BASE}/api/app/public-latest`)
.then(r => r.json()) .then(r => r.json())
.then((d: AppInfo) => setInfo(d)) .then((d: AppInfo) => setInfo({ ...d, qr_url: fixUrl(d.qr_url), landing_url: fixUrl(d.landing_url), download_url: fixUrl(d.download_url) }))
.catch(() => setErr('앱 저장소에 연결할 수 없습니다. 잠시 후 다시 시도하세요.')) .catch(() => setErr('앱 저장소에 연결할 수 없습니다. 잠시 후 다시 시도하세요.'))
.finally(() => setLoading(false)) .finally(() => setLoading(false))
} }