diff --git a/docker/nginx.conf b/docker/nginx.conf index eb62e536..bfd98916 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -20,19 +20,19 @@ http { } # Proxy IO requests - location /socket.io/ { - proxy_pass http://0.0.0.0:8081; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; + #location /socket.io/ { + # proxy_pass http://0.0.0.0:8081; + # proxy_http_version 1.1; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection 'upgrade'; + # proxy_set_header Host $host; + # proxy_cache_bypass $http_upgrade; - # CORS settings - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Methods' '*'; - add_header 'Access-Control-Allow-Headers' '*'; - } + # # CORS settings + # add_header 'Access-Control-Allow-Origin' '*'; + # add_header 'Access-Control-Allow-Methods' '*'; + # add_header 'Access-Control-Allow-Headers' '*'; + #} # Error pages error_page 500 502 503 504 /50x.html; diff --git a/src/backend/server.cjs b/src/backend/server.cjs index 2bbc3fa4..e7a73c4c 100644 --- a/src/backend/server.cjs +++ b/src/backend/server.cjs @@ -8,7 +8,8 @@ const io = socketIo(server, { origin: "*", // Allow all origins methods: ["*"], // Allow all methods allowedHeaders: ["*"], // Allow all headers - } + }, + allowEIO3: true }); io.on("connection", (socket) => {