跳至內容 跳至搜尋
名稱空間
方法
R

實例公開方法

reject_unauthorized_connection()

如果 WebSocket 連線為開啟狀態,則關閉它並傳回「未授權」原因。

# File actioncable/lib/action_cable/connection/authorization.rb, line 12
def reject_unauthorized_connection
  logger.error "An unauthorized connection attempt was rejected"
  raise UnauthorizedError
end