hi devs, i am using zebra-broswer-print-wrapper a third party package in my react js application to communicate with zebra-broswer-print. when the app in running in local machine the app is working perfectly. The printer is printing the barcode label.But when the app is hosted in remote server the app is not printing the label. In developer console there is a error message cors error between localhost://available:9100 and my hosted app ip url. how to add the remote url in zebra-broswer-print as there is no option for adding url for the desktop application in setiing of that application.
Zebra-browser-print is working in localhost but not in hosted site in remote server?// Expert user has replied. |
2 Replies
Have you tried to host the demo that comes with the Browser Print release in a remote server, so as to make sure if there is any CORS issue in the network settings?
The cagdemo.com, for example, is hosted on a remote server. When trying to access the cagdemo.com site, we should receive a notification to ask us to add the host URL to the Accepted Hosts list in the Browser Print. When accessing your app remotely, we should receive a notification like the one below.
But my connection is in http:// not https:// is this is the issue. How to get rid of it as your example is working perfectly but not mine it is showing cors error as "Access to XMLHttpRequest at 'http://127.0.0.1:9100/default?type=printer' from origin 'http://site.com' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`