I’m trying to get the video stream from the mobile server. I’m using the XPMobileSDK demo but I get this error:
“Failed to load http://10.23.11.115/XProtectMobile/Communication: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:26125’ is therefore not allowed access.”
I have already added the following lines in the configuration file:
Does anyone have any suggestions?
The instructions for the Mobile Server sample outline how you must use the Mobile Server and must use this folder: “[C:\Program](file:C:/Program) Files\Milestone\XProtect Mobile Server\Web”
http://doc.developer.milestonesys.com/html/index.html?base=samples/mobileserversample.html&tree=tree_3.html
You can use another server, if you need this please see this knowledge base article - https://force.milestonesys.com/support/articles/en_US/How_To/XProtect-Mobile-Server-app-on-different-server-CORS
We’re facing this same issue at a client place.
The headers have been added but to no avail. It still says, blocked by CORS policy.
Any resolution to this?
Milestone Mobile Server 2017 R3 and Milestone XProtect 2017 R3 are being used.
Both have been setup on two different machines and we’re trying to connect to the Mobile Server from one another machine.
For 2017R3 the correct parameter in the config (located in the Mobile Server installer folder) file is
Then your client should set the header “Access-Control-Allow-Origin” when making requests to Mobile Server.
Please set , unless you explicitly want to use it.