Access to XMLHttpRequest at ‘https://a/socket.io/?token= from origin has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ [duplicate]

Access to XMLHttpRequest at ‘https://vm-node.azurewebsites.net/socket.io/?token=Bearer [REDACTED]&userid=tom%40mailinator.com&EIO=3&transport=polling&t=OsOUdZe’ from origin ‘http://localhost:4202’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Client side

var iosocket = io('https://vm-node.azurewebsites.net', {
  query: {
    token: '',
    userid: ''
  }
});

  • 1

    There are many, many questions here explaining CORS policies in various situations, and what is necessary to get to your target resource.

    – 

Leave a Comment