mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 00:23:53 +08:00
Merge pull request #1830 from hsycc/main
fix: 修复配置声纹识别地址为域名不带端口, 请求url错误的问题
This commit is contained in:
+5
-1
@@ -219,7 +219,11 @@ public class AgentVoicePrintServiceImpl extends ServiceImpl<AgentVoicePrintDao,
|
|||||||
String protocol = uri.getScheme();
|
String protocol = uri.getScheme();
|
||||||
String host = uri.getHost();
|
String host = uri.getHost();
|
||||||
int port = uri.getPort();
|
int port = uri.getPort();
|
||||||
return "%s://%s:%s".formatted(protocol, host, port);
|
if (port == -1) {
|
||||||
|
return "%s://%s".formatted(protocol, host);
|
||||||
|
} else {
|
||||||
|
return "%s://%s:%s".formatted(protocol, host, port);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user