Skip to content

Commit 492fc4b

Browse files
authored
Merge pull request #413 from PromptPlace/develop
Develop
2 parents 42cfc34 + 2a0983b commit 492fc4b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Caddyfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ http://promptplace.kro.kr {
1616
Referrer-Policy "strict-origin-when-cross-origin"
1717
}
1818

19+
# Socket.IO 요청을 백엔드로 전달
20+
handle /socket.io/* {
21+
reverse_proxy app:3000
22+
}
23+
1924
# api-docs 요청을 앱으로 전달
2025
handle /api-docs* {
2126
reverse_proxy app:3000
@@ -59,6 +64,11 @@ http://promptplace-dev.kro.kr {
5964
Referrer-Policy "strict-origin-when-cross-origin"
6065
}
6166

67+
# Socket.IO 요청을 백엔드로 전달
68+
handle /socket.io/* {
69+
reverse_proxy app-dev:3000
70+
}
71+
6272
handle /api/* {
6373
# app-dev 컨테이너(테스트용)로 연결
6474
reverse_proxy app-dev:3000 {

src/socket/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export const initSocket = (httpServer: HttpServer) => {
8383
"https://promptplace-develop.vercel.app",
8484
],
8585
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
86+
allowedHeaders: ["Authorization", "Content-Type"],
8687
credentials: true
8788
}
8889
});

0 commit comments

Comments
 (0)