Answer the question
In order to leave comments, you need to log in
How to set up cors in larave + node.js?
I have a site on laravel and on it websockets (node.js)
Server.js
var io = require('socket.io')(6001);
io.on('connection', function(socket){
console.log('New Connection!');
})
var socket = io(':6001');
Access to XMLHttpRequest at 'http://myapp:6001/socket.io/?EIO=4&transport=polling&t=NxPwAZS' from origin 'http://myapp' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question