From 193e1a24a19b6bd97330a9a5cd3ea172d85d20ce Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 23 Mar 2023 20:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=B9assist=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genersoft/iot/vmp/conf/ProxyServletConfig.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java index d24380a3..d398f12c 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java @@ -169,13 +169,11 @@ public class ProxyServletConfig { protected String rewriteQueryStringFromRequest(HttpServletRequest servletRequest, String queryString) { String queryStr = super.rewriteQueryStringFromRequest(servletRequest, queryString); MediaServerItem mediaInfo = getMediaInfoByUri(servletRequest.getRequestURI()); - String remoteHost = String.format("http://%s:%s", mediaInfo.getIp(), mediaInfo.getHttpPort()); - if (mediaInfo != null) { - if (!ObjectUtils.isEmpty(queryStr)) { - queryStr += "&remoteHost=" + remoteHost; - }else { - queryStr = "remoteHost=" + remoteHost; - } + String remoteHost = String.format("http://%s:%s", mediaInfo.getStreamIp(), mediaInfo.getHttpPort()); + if (!ObjectUtils.isEmpty(queryStr)) { + queryStr += "&remoteHost=" + remoteHost; + }else { + queryStr = "remoteHost=" + remoteHost; } return queryStr; }