Nginx反代wss

147次阅读
没有评论

共计 574 个字符,预计需要花费 2 分钟才能阅读完成。

Nginx反向代理wss,使用如下location

location / {
  proxy_pass https://tracker.openwebtorrent.com;
  proxy_ssl_server_name on;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;  
  proxy_set_header Connection "Upgrade";  
  
    # add_header Access-Control-Allow-Origin *;
    # proxy_redirect off;
    # proxy_pass https://wss地址;
    # proxy_set_header Host $host;
   proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
    # proxy_http_version 1.1;
    # proxy_set_header Upgrade $http_upgrade;  
    # proxy_set_header Connection "Upgrade";  
    # proxy_ssl_server_name on;
    # proxy_hide_header Strict-Transport-Security;
}

 

正文完
 
admin
版权声明:本站原创文章,由 admin 2022-02-20发表,共计574字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码