芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/joolsmen.com/chat/vendor/cboden/ratchet/src/Ratchet/Http/OriginCheck.php
_component = $component; $this->allowedOrigins += $allowed; } /** * {@inheritdoc} */ public function onOpen(ConnectionInterface $conn, RequestInterface $request = null) { $header = (string)$request->getHeader('Origin')[0]; $origin = parse_url($header, PHP_URL_HOST) ?: $header; if (!in_array($origin, $this->allowedOrigins)) { return $this->close($conn, 403); } return $this->_component->onOpen($conn, $request); } /** * {@inheritdoc} */ function onMessage(ConnectionInterface $from, $msg) { return $this->_component->onMessage($from, $msg); } /** * {@inheritdoc} */ function onClose(ConnectionInterface $conn) { return $this->_component->onClose($conn); } /** * {@inheritdoc} */ function onError(ConnectionInterface $conn, \Exception $e) { return $this->_component->onError($conn, $e); } }