优化对assist接口的代理

pull/800/head
648540858 2023-03-23 20:52:05 +08:00
parent a4328e3d4f
commit 193e1a24a1
1 changed files with 5 additions and 7 deletions

View File

@ -169,13 +169,11 @@ 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;
} }