Answers for "socket.io has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource"

6

socket io with cors

const io = require("socket.io")(httpServer, 
  { 
  cors: {    
    origin: "*",    
    methods: ["GET", "POST"]  
  }});
Posted by: Guest on December-25-2020
-1

from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

@CrossOrigin(origins = "http://localhost:4200")
@GetMapping("/yourPath")
Posted by: Guest on December-31-2020

Code answers related to "socket.io has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource"

Code answers related to "Javascript"

Browse Popular Code Answers by Language