Advertisement

[SOLVED]: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource

While I was building a chat application with socket.io  version 4 I encountered this error .

Problem: I was not being able to fetch the response from the client.js to server.js nor I was getting error in console I tried a to log out through console.log and came to know that reponse is not being sent to server.js that later I inspected the browser through inspect element and came to know about this error

Error: 


 

server.js


 

 improvement in server.js:

           



Post a Comment

0 Comments