I am working on a web application made in MERN stack and had integrated Epson Javascript SDK to print receipts as we are using Epson TM-M30 Printer. Web app might be running on mostly Safari but it can chrome or firefox sometimes.
I doubt assigning a CA certificate to a private IP will work or not. Correct me if I am wrong.
It works perfectly in localhost
on PORT 8008
with respective printer IPs
and deviceID
as per they mention in their SDK Document connection function.
When I try to access the same printer using the same web application hosted on Domain that is running on HTTPS protocol on PORT 8043
which is specifically mentioned in SDK document connection function. Browser blocks web application request to print receipt and throws ERR_CERTIFICATE_INVALID
.
I had checked in Printer configuration and it shows that printer is running on SELF SIGNED CERTIFICATE
.
Is there a way to make it accessible?
I am requesting connection using the following piece of code:
new epson.ePOSDevice().connect(ipAddress, port); PORT: 8008 for localhost and 8043 from hosted domain
Your options here are a bit limited, either you need to install a signed certificate on the printer or you need to configure your browser to allow self signed certs, which is something that browser makers have made harder over the years.
You don’t say which printer or browser you are using, so it hard to give a full answer, however if your using Chrome you can follow these instructions.