I'm trying to use an Epson TM-T20II (thermal printer) via a web page. I've done the necessary configuration and the printer works fine on my network using the given software. So I downloaded the JS epos print SDK, and tried to run this sample code :
TITLE
For the devid parameter I tried 'local_printer' which is the name of the device, then I saw in the configuration panel that the printer id is 99. Still, it doesn't work, I got a 405 Method not allowed status code on the cgi request.
Any tips? Thanks in advance.
EDIT :
So, after some research, it seems that the problem comes from a CORS request. The request is preflight for security matters, and this preflight request doesn't pass acces control because the 'Access-Control-Allow-Origin' header is missing from the response. So how do I set this header?