-2

im testing my game on webgl build and i have encountered an error when i tried to fetch data from the database :

XMLHttpRequest cannot load Origin is not allowed by Access-Control-Allow-Origin.

i understand that it got something to do with javascript security thing that i have no experience with.

any one know how t solve this issue?

dvrer
  • 589
  • 6
  • 17
  • Possible duplicate of ["No 'Access-Control-Allow-Origin' header is present on the requested resource"](http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource) – Tamas Hegedus Jul 02 '16 at 19:33

1 Answers1

0

The Unity Manual discusses this here. Do you have direct control of the server? If so, implement CORS there. If not, try moving the affected resources to the same server your unity scripts are running from.

If you need more specific advice, you'll need to provide more details.

Paul-Jan
  • 16,746
  • 1
  • 63
  • 95