简体   繁体   中英

Html5 video from webapp1 uses source from webapp2, how to avoid exposing webapp2 to browsers from external network

Web application is composed of jBoss and Tomcat on the same physical host but with different port numbers. Client browsers access video from jBoss page, but tag "source" is composed of HTTP POST REST to Tomcat where video resource actually resides. If browser accesses page with video from internal network, it is ok. But from external network only https port of jBoss is accessible via port forwarding. So, from external network REST to Tomcat is not working and video is broken. Video stream is redirected from Tomcat, where it resides, because video file size can be up to hundreds Mbs. Actually simplified html with video looks like that:

<!DOCTYPE html>
<html>
<body>
<video controls preload="metadata">
  <source src="http://172.32.1.18:8181/alfresco/s/api/node/content/workspace/SpacesStore/1164baa5-e11b-4efe-b571-2b5342f31702?alf_ticket=TICKET_d7044925cd76f054254aa859488a00d4cb30c0c8" type="video/mp4">
</video>
</body>
</html>

How is it possible to avoid Tomcat port forwarding to expose video to external network? Currently I see only the possibility to retranslate REST from Tomcat at jBoss side as HTTPS POST REST, but it will produce additional traffic.

The question was solved via web proxy, nginx was used. Nginx is located in local network and forwards local and internet https requests to different app servers according to host name in the requests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM