Commit 193e1a24a19b6bd97330a9a5cd3ea172d85d20ce
1 parent
a4328e3d
优化对assist接口的代理
Showing
1 changed file
with
5 additions
and
7 deletions
src/main/java/com/genersoft/iot/vmp/conf/ProxyServletConfig.java
| ... | ... | @@ -169,13 +169,11 @@ public class ProxyServletConfig { |
| 169 | 169 | protected String rewriteQueryStringFromRequest(HttpServletRequest servletRequest, String queryString) { |
| 170 | 170 | String queryStr = super.rewriteQueryStringFromRequest(servletRequest, queryString); |
| 171 | 171 | MediaServerItem mediaInfo = getMediaInfoByUri(servletRequest.getRequestURI()); |
| 172 | - String remoteHost = String.format("http://%s:%s", mediaInfo.getIp(), mediaInfo.getHttpPort()); | |
| 173 | - if (mediaInfo != null) { | |
| 174 | - if (!ObjectUtils.isEmpty(queryStr)) { | |
| 175 | - queryStr += "&remoteHost=" + remoteHost; | |
| 176 | - }else { | |
| 177 | - queryStr = "remoteHost=" + remoteHost; | |
| 178 | - } | |
| 172 | + String remoteHost = String.format("http://%s:%s", mediaInfo.getStreamIp(), mediaInfo.getHttpPort()); | |
| 173 | + if (!ObjectUtils.isEmpty(queryStr)) { | |
| 174 | + queryStr += "&remoteHost=" + remoteHost; | |
| 175 | + }else { | |
| 176 | + queryStr = "remoteHost=" + remoteHost; | |
| 179 | 177 | } |
| 180 | 178 | return queryStr; |
| 181 | 179 | } | ... | ... |