浏览代码

update: stash compatible

tokumeikoi 3 年之前
父节点
当前提交
2b698b63e0
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/Http/Controllers/Client/Protocols/Stash.php

+ 5 - 0
app/Http/Controllers/Client/Protocols/Stash.php

@@ -121,6 +121,11 @@ class Stash
                     $array['ws-opts']['path'] = $wsSettings['path'];
                     $array['ws-opts']['path'] = $wsSettings['path'];
                 if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host']))
                 if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host']))
                     $array['ws-opts']['headers'] = ['Host' => $wsSettings['headers']['Host']];
                     $array['ws-opts']['headers'] = ['Host' => $wsSettings['headers']['Host']];
+                // TODO: 2022.06.01 remove it
+                if (isset($wsSettings['path']) && !empty($wsSettings['path']))
+                    $array['ws-path'] = $wsSettings['path'];
+                if (isset($wsSettings['headers']['Host']) && !empty($wsSettings['headers']['Host']))
+                    $array['ws-headers'] = ['Host' => $wsSettings['headers']['Host']];
             }
             }
         }
         }
         if ($server['network'] === 'grpc') {
         if ($server['network'] === 'grpc') {