Repository navigation
Commit 1eb3a98
Quy Ngoc Nguyen
fix(usage): a CLIProxyAPI hub served under a path keeps its path
The management URL was built with an absolute path, `new URL("/v0/management/...", hubUrl)`,
which replaces whatever path the hub URL carries. A hub behind a reverse proxy at
https://tools.example/cliproxy was therefore asked at https://tools.example/v0/management/...
and every read failed. The URL is now resolved relative to the hub URL with a trailing slash,
so a root URL behaves as before and a prefixed one keeps its prefix.1 parent d10621d commit 1eb3a98
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
0 commit comments