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.*/]
请指导正确的必需设置。