File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ SATORI_CLIENTS='
41
41
{
42
42
"host": "localhost",
43
43
"port": "5500",
44
+ "path": "",
44
45
"token": "xxx"
45
46
}
46
47
]
@@ -49,6 +50,8 @@ SATORI_CLIENTS='
49
50
50
51
` host ` 与 ` port ` 为 Satori 服务端的监听地址与端口,
51
52
53
+ ` path ` 为 Satori 服务端自定义的监听路径,如 ` "/satori" ` ,默认为 ` "" `
54
+
52
55
` token ` 由 Satori 服务端决定是否需要。
53
56
54
57
Original file line number Diff line number Diff line change 6
6
7
7
class ClientInfo (BaseModel ):
8
8
host : str = "localhost"
9
+ """服务端的地址"""
9
10
port : int
11
+ """服务端的端口"""
12
+ path : str = ""
13
+ """服务端的自定义路径"""
10
14
token : Optional [str ] = None
15
+ """服务端的 token"""
11
16
12
17
@property
13
18
def identity (self ):
14
19
return f"{ self .host } :{ self .port } #{ self .token } "
15
20
16
21
@property
17
22
def api_base (self ):
18
- return URL (f"http://{ self .host } :{ self .port } " ) / "v1"
23
+ return URL (f"http://{ self .host } :{ self .port } " ) / self . path / "v1"
19
24
20
25
@property
21
26
def ws_base (self ):
22
- return URL (f"ws://{ self .host } :{ self .port } " ) / "v1"
27
+ return URL (f"ws://{ self .host } :{ self .port } " ) / self . path / "v1"
23
28
24
29
25
30
class Config (BaseModel , extra = Extra .ignore ):
You can’t perform that action at this time.
0 commit comments