chilipeppr / serial-port-json-server

Serial Port JSON Server is a websocket server for your serial devices. It compiles to a binary for Windows, Mac, Linux, Raspberry Pi, or BeagleBone Black that lets you communicate with your serial port from a web application. This enables web apps to be written that can communicate with your local serial device such as an Arduino, CNC controller, or any device that communicates over the serial port.
http://chilipeppr.com
GNU General Public License v2.0
321 stars 101 forks source link

No 'Access-Control-Allow-Origin' header from localhost to localhost #53

Closed binaryangel-noa closed 6 years ago

binaryangel-noa commented 6 years ago

Hallo,

i am calling the server on localhost and get the following response: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access

And websocket returns always 404.

chilipeppr commented 6 years ago

That sounds to me like you're not connecting to a websocket, rather you're trying to do an HTTP ajax call?

On Tue, Jun 19, 2018 at 7:49 AM binaryangel-noah notifications@github.com wrote:

Hallo,

i am calling the server on localhost and get the following response: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access

And websocket returns always 404.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chilipeppr/serial-port-json-server/issues/53, or mute the thread https://github.com/notifications/unsubscribe-auth/AHidbfhf7NbXwmgOnb9rrx_07DARU2bNks5t-Q9ogaJpZM4Utqbx .

binaryangel-noa commented 6 years ago

I am trying both.

EDIT. Got now the websocket to work after all. Thanks and sorry!