Преглед на файлове

Remove forced ws client header 'Origin'.

This is not needed in common cases and may cause 4xx response.
The default value '*' is also invalid.
Ares преди 6 години
родител
ревизия
fe7f9c3078
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Protocols/Ws.php

+ 1 - 1
Protocols/Ws.php

@@ -383,7 +383,7 @@ class Ws
         (!preg_match("/\nHost:/i", $user_header_str) ? "Host: $host\r\n" : '').
         "Connection: Upgrade\r\n".
         "Upgrade: websocket\r\n".
-        "Origin: ". (isset($connection->websocketOrigin) ? $connection->websocketOrigin : '*') ."\r\n".
+        (isset($connection->websocketOrigin) ? "Origin: ".$connection->websocketOrigin."\r\n":'').
         (isset($connection->WSClientProtocol)?"Sec-WebSocket-Protocol: ".$connection->WSClientProtocol."\r\n":'').
         "Sec-WebSocket-Version: 13\r\n".
         "Sec-WebSocket-Key: " . $connection->websocketSecKey . $user_header_str . "\r\n\r\n";