Search code examples
javascriptnode.jsrequirejsjssip

RequireJS + NodeJS returning XMLHttpRequest cannot load 'http' No 'Access-Control-Allow-Origin' header


Im trying to use JsSIP, but when I use the RequireJS to enable require in the client side CHROME returns:

XMLHttpRequest cannot load http://localhost/videochat/videonodejs/scripts/jssip. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.

Its all in localhost, so what could be the origin problem? I do have the port number in my URL, could that be it?


Solution

  • The jssip request is on port 80 the app is on port 3000. Those are not the same origin, per the same-origin policy.