失败:WebSocket握手时出错:意外的响应代码:502

问题描述 投票:0回答:1

websocket在http上工作正常,但在https上却出现以下错误:

failed: Error during WebSocket handshake: Unexpected response code: 502

我在服务器上使用ruby 2.4的Rails 5.2,在乘客模块上使用nginx。在production.rb文件中进行了以下设置:

  # Mount Action Cable outside main process or domain
  # config.action_cable.mount_path = nil
  config.action_cable.url = 'wss://tukaweb.com/cable'
  config.action_cable.allowed_request_origins = ['https://tukaweb.com', /http:\/\/tukaweb.*/]

请指导正确的必需设置。

ruby-on-rails websocket rubygems ruby-on-rails-5 actioncable
1个回答
0
投票
我遇到了同样的问题,并且我正在寻找超过15天的时间无解哇
© www.soinside.com 2019 - 2024. All rights reserved.