Fix: 클라우드플레어 터널 HTTPS 환경에서 Mixed Content 오류 수정
- document-loader.js에서 하드코딩된 localhost:24102 URL 제거 - window.location.origin을 사용하여 동적으로 현재 도메인 사용 - HTTPS 환경에서 HTTP 리소스 요청으로 인한 브라우저 차단 문제 해결 - 클라우드플레어 터널링 환경에서 문서 로드 정상화
This commit is contained in:
@@ -57,10 +57,10 @@ class DocumentLoader {
|
||||
|
||||
// HTML 경로가 있는 경우에만 HTML 로드
|
||||
if (docData.html_path) {
|
||||
// HTML 파일 경로 구성 (백엔드 서버를 통해 접근)
|
||||
// HTML 파일 경로 구성 (nginx 프록시를 통해 접근)
|
||||
const htmlPath = docData.html_path;
|
||||
const fileName = htmlPath.split('/').pop();
|
||||
const response = await fetch(`http://localhost:24102/uploads/documents/${fileName}`);
|
||||
const response = await fetch(`${window.location.origin}/uploads/documents/${fileName}`);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('문서 파일을 불러올 수 없습니다');
|
||||
|
||||
Reference in New Issue
Block a user