当nginx配置了 开启 ws 后
如图 当开启这个配置 就不能使用 Ajax post
试试下面的配置
map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { location / { proxy_pass http://web; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } }