Skip to content

Commit 25fa02d

Browse files
authored
Merge pull request #106 from DMU-DebugVisual/inseong2
mixed err fixed
2 parents 6cfc17d + ecef98f commit 25fa02d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/codecast/codecastlive/CodecastLive.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import ChatPanel from './ChatPanel';
1111
import useCollabSocket from '../hooks/useCollabSocket';
1212
import { createSession, updateSessionStatus } from '../api/sessions';
1313
import { fetchMyFiles, fetchFileContent, inferLanguageFromFilename, saveFile } from '../api/files';
14+
import config from '../../../config';
1415

1516
import {
1617
FaCheck,
@@ -28,7 +29,10 @@ import {
2829
async function joinRoomApi(roomId, token) {
2930
if (!token) throw new Error("인증 토큰이 없습니다. 로그인이 필요합니다.");
3031

31-
const API_BASE = process.env.REACT_APP_API_BASE_URL || 'http://52.79.145.160:8080';
32+
const API_BASE =
33+
process.env.REACT_APP_API_BASE_URL ||
34+
config.API_BASE_URL ||
35+
(typeof window !== 'undefined' ? `${window.location.protocol}//${window.location.host}` : '');
3236
const res = await fetch(`${API_BASE}/api/collab/rooms/${encodeURIComponent(roomId)}/participants`, {
3337
method: 'POST',
3438
headers: {

0 commit comments

Comments
 (0)