使用SockJS 報錯 Incompatibile SockJS! Main site uses: “1.0.3“, the iframe: “1.0.0“. 已處理

qq_36089262發表於2020-11-13

1.聊天室使用SockJS 報錯 Incompatibile SockJS! Main site uses: “1.0.3”, the iframe: “1.0.0”.

遇到這個情況首先看下專案是否配置了NGINX,如果配置需要修改代理:

location /websocket/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_pass http://127.0.0.1:9999;
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_connect_timeout 60;
proxy_read_timeout 600;
proxy_send_timeout 600;
}

9999為專案埠

相關文章