How to solve the cross-domain phenomenon of the EasyCVR call interface of the AI smart security video surveillance aggregation platform?

Video Surveillance Convergence EasyCVR has strong scalability, flexible video capabilities, and easy deployment. The mainstream standard protocols that can be supported include GB28181, RTSP/Onvif, RTMP, etc., as well as manufacturers' private protocols and SDK access, including Haikang Ehome, Haidayu and other equipment SDK, etc., can distribute video streams in RTSP, RTMP, FLV, HLS, WebRTC and other formats. In order to facilitate users' secondary development, integration and calling, we also provide a wealth of API interfaces for users to use. Users in need can view the official API documents of the video surveillance integrated management platform EasyCVR.

Some users reported that when using the security monitoring video EasyCVR, the call interface has a cross-domain phenomenon, as shown in the figure:

We immediately investigated the situation.

During the investigation, it was found that when one cross-domain domain name is configured, the interface can be accessed normally, but after two domain names are configured, cross-domain problems will occur.

Check the code and find that the browser does not support resolving multiple domain names at the same time when assigning cross-domain request headers:

Solution: Add a judgment when assigning the request header. If the client domain name exists in the configuration, it will be allowed to pass, thus solving the above cross-domain problem.

The video surveillance aggregation platform EasyCVR can support the lightweight access and aggregation management of massive videos. In terms of intelligent video surveillance capabilities, it can provide video surveillance live broadcast, video carousel, video recording, cloud storage, playback and retrieval, intelligent alarm, server cluster, voice intercom, PTZ control, electronic map, platform cascading, etc. The video aggregation screen supports 1, 4, 9, and 16 screen windows to play, and plays multiple video streams at the same time. Interested users can go to the demonstration platform for experience or deployment testing.

Guess you like

Origin blog.csdn.net/TsingSee/article/details/132097964