'Access-Control-Allow-Origin' header is present on the requested resource

I’m getting the following error when I’m trying to run the Mobile SDK sample

[C:\Program](file:C:/Program) Files\Milestone\Milestone Mobile Server\Web\XPMobileSDK\Samples

Using XAMPP on port 8011.

Failed to load http://localhost:8081/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:8011’ is therefore not allowed access.

I hope this answers it:

https://force.milestonesys.com/support/articles/en_US/How_To/XProtect-Mobile-Server-app-on-different-server-CORS