Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions nginx/conf.d/prod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ server {
listen 80;
server_name cockple.store;

location /ws/ {
proxy_pass http://cockple-app:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
}

location / {
proxy_pass http://cockple-app:8080;
proxy_set_header Host $host;
Expand Down
11 changes: 11 additions & 0 deletions nginx/conf.d/staging.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ server {
listen 80;
server_name staging.cockple.store;

location /ws/ {
proxy_pass http://cockple-app-staging:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
}

location / {
proxy_pass http://cockple-app-staging:8080;
proxy_set_header Host $host;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
registry
.addHandler(chatWebSocketHandler, "/ws/chats")
.addInterceptors(jwtWebSocketAuthInterceptor)
.setAllowedOrigins("http://localhost:5173", "https://cockple.store", "https://cockple-fe.vercel.app/")
.setAllowedOrigins("http://localhost:5173", "https://cockple.store", "https://cockple-fe.vercel.app/", "https://staging.cockple.store")
.withSockJS(); // 브라우저 호환성
}
}