mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-11-29 02:42:51 +00:00
исправил работу с SecretWebPath
This commit is contained in:
parent
0faf959c49
commit
971513464e
2 changed files with 9 additions and 2 deletions
|
|
@ -38,6 +38,7 @@
|
|||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>Port</th>
|
||||
<th>Status</th>
|
||||
<th>Enabled</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
|
|
@ -212,7 +213,13 @@
|
|||
if (this.modal.server.id) {
|
||||
url = `/panel/api/servers/update/${this.modal.server.id}`;
|
||||
}
|
||||
|
||||
let secretWebPath = this.modal.server.secretWebPath;
|
||||
if (!secretWebPath.startsWith('/')) {
|
||||
secretWebPath = '/' + secretWebPath.slice(1);
|
||||
}
|
||||
if (!secretWebPath.endsWith('/')) {
|
||||
secretWebPath = secretWebPath.slice(0, -1) + '/';
|
||||
}
|
||||
console.log(this.modal.server);
|
||||
axios
|
||||
.post(url, this.modal.server)
|
||||
|
|
|
|||
|
|
@ -2411,7 +2411,7 @@ func (s *InboundService) syncWithSlaves(method string, path string, contentType
|
|||
continue
|
||||
}
|
||||
|
||||
urlStr := fmt.Sprintf("http://%s:%d%s", server.Address, server.Port, path)
|
||||
urlStr := fmt.Sprintf("http://%s:%d/%s%s", server.Address, server.Port, server.SecretWebPath, path)
|
||||
|
||||
if len(params) > 0 {
|
||||
urlStr = fmt.Sprintf("%s/%s", urlStr, strings.Join(params, "/"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue