优化对assist接口的代理

This commit is contained in:
648540858 2023-03-23 20:52:05 +08:00
parent a4328e3d4f
commit 193e1a24a1

View File

@ -169,14 +169,12 @@ public class ProxyServletConfig {
protected String rewriteQueryStringFromRequest(HttpServletRequest servletRequest, String queryString) { protected String rewriteQueryStringFromRequest(HttpServletRequest servletRequest, String queryString) {
String queryStr = super.rewriteQueryStringFromRequest(servletRequest, queryString); String queryStr = super.rewriteQueryStringFromRequest(servletRequest, queryString);
MediaServerItem mediaInfo = getMediaInfoByUri(servletRequest.getRequestURI()); MediaServerItem mediaInfo = getMediaInfoByUri(servletRequest.getRequestURI());
String remoteHost = String.format("http://%s:%s", mediaInfo.getIp(), mediaInfo.getHttpPort()); String remoteHost = String.format("http://%s:%s", mediaInfo.getStreamIp(), mediaInfo.getHttpPort());
if (mediaInfo != null) {
if (!ObjectUtils.isEmpty(queryStr)) { if (!ObjectUtils.isEmpty(queryStr)) {
queryStr += "&remoteHost=" + remoteHost; queryStr += "&remoteHost=" + remoteHost;
}else { }else {
queryStr = "remoteHost=" + remoteHost; queryStr = "remoteHost=" + remoteHost;
} }
}
return queryStr; return queryStr;
} }