websocket 不支持 http2
这是我的配置可以参考一下
```
server {
listen 443 ssl http2;
server_name
your.example.com; # 域名
charset utf-8;
# 以下 ssl 目录根据实际情况进行调整
ssl_certificate /work/ssl/chained.pem;
ssl_certificate_key /work/ssl/domain.key;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
add_header X-UA-Compatible "IE=edge,chrome=1"; # IE 用最新内核渲染页面
client_max_body_size 50M;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_redirect default;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
}
}
```