Answer the question
In order to leave comments, you need to log in
Fix cors error using client side nginx?
Good afternoon.
There is a certain closed site used in our stores, which is hosted outside the local network and there are DVRs that are naturally located in the local network. I'm trying to implement the task: when certain actions are performed on the site, a special xml file is sent to the DVR
function sendNVR()
{
var xml =
"<?xml version: '1.0' encoding='utf-8'?><VideoOverlay><normalizedScreenSize><normalizedScreenWidth>704</normalizedScreenWidth> <normalizedScreenHeight>576</normalizedScreenHeight></normalizedScreenSize><attribute><transparent>false</transparent> <flashing>false</flashing></attribute><fontSize>1</fontSize><TextOverlayList><TextOverlay><id>1</id><enabled>true</enabled><displayText>text1</displayText><positionX>20</positionX><positionY>500</positionY></TextOverlay><TextOverlay><id>2</id><enabled>true</enabled><displayText>text2</displayText></TextOverlay></TextOverlayList></VideoOverlay>";
var xhr = new XMLHttpRequest();
xhr.open("PUT", 'http://admin:[email protected]/ISAPI/System/Video/inputs/channels/1/overlays', true);
. Answer the question
In order to leave comments, you need to log in
Maybe you can make some URL on the site that will give the correct CORS headers, and accept XML, which will immediately, already from the server (which does not care about CORS), go to the video recorders.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question