Good morning, I've been having a problem with the BrowserPrint SDK for a few days now. Until recently, my production web app was using the driver without any issues, but now I am receiving a CORS error from the browser. I haven't made any changes to the site. What could have happened? The error is: Access to XMLHttpRequest at 'http://127.0.0.1:9100/available' from origin 'https://mysite.it' has been blocked by CORS policy: Cannot parse Access-Control-Allow-Headers response header field in preflight response.
I don't have any problem in development when the origin is the same.
The prompt to add permission in zebra browser print shows up and i have my site listed in the driver accepted sources.
any suggestion?
2 Replies
Has the browser been updated? What's the version of the browser? Can you try this site to see if it works with your browser - https://cagdemo.com?
Hi VVasco,
This CORS issue with BrowserPrint SDK can be frustrating. Here are some potential solutions:
{
"AllowedOrigins": ["https://mysite.it"],
"EnableCORS": true
}
// Add these headers to your server response
res.header('Access-Control-Allow-Origin', 'https://mysite.it');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
If none of these work, you might want to:
For more information, here is the link to visit: https://developer.zebra.com/latest-discussions