From 3fffc5881889857ab0f56a9fe5b93eae629e6047 Mon Sep 17 00:00:00 2001 From: minij02 Date: Thu, 12 Feb 2026 02:12:56 +0900 Subject: [PATCH 1/2] Fix: Add allowed headers for Socket.io --- src/socket/server.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/socket/server.ts b/src/socket/server.ts index 9894e56..edd9d45 100644 --- a/src/socket/server.ts +++ b/src/socket/server.ts @@ -83,6 +83,7 @@ export const initSocket = (httpServer: HttpServer) => { "https://promptplace-develop.vercel.app", ], methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + allowedHeaders: ["Authorization", "Content-Type"], credentials: true } }); From 073733622751af89a2f15add4c8f5621e9f1f158 Mon Sep 17 00:00:00 2001 From: minij02 Date: Thu, 12 Feb 2026 02:24:26 +0900 Subject: [PATCH 2/2] Fix: Update Caddyfile to proxy Socket.io requests for prod and dev environments --- Caddyfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Caddyfile b/Caddyfile index 09b2b84..e3721d6 100644 --- a/Caddyfile +++ b/Caddyfile @@ -16,6 +16,11 @@ http://promptplace.kro.kr { Referrer-Policy "strict-origin-when-cross-origin" } + # Socket.IO 요청을 백엔드로 전달 + handle /socket.io/* { + reverse_proxy app:3000 + } + # api-docs 요청을 앱으로 전달 handle /api-docs* { reverse_proxy app:3000 @@ -59,6 +64,11 @@ http://promptplace-dev.kro.kr { Referrer-Policy "strict-origin-when-cross-origin" } + # Socket.IO 요청을 백엔드로 전달 + handle /socket.io/* { + reverse_proxy app-dev:3000 + } + handle /api/* { # app-dev 컨테이너(테스트용)로 연결 reverse_proxy app-dev:3000 {