CORS issue

// Expert user has replied.
V Vasco Maria Livio 1 year 1 month ago
329 2 0

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?

Please Register or Login to post a reply

2 Replies

S Steven Si

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?

H Haris Komodo

Hi VVasco,

This CORS issue with BrowserPrint SDK can be frustrating. Here are some potential solutions:

  1. Check BrowserPrint Service configuration:

{
   "AllowedOrigins": ["https://mysite.it"],
   "EnableCORS": true
}

  1. Verify your browser's security settings:
  • Make sure you're using the latest version of BrowserPrint
  • Clear browser cache and cookies
  • Try in incognito mode
  1. Server-side solutions:

// 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');

 

  1. Check if your site's SSL certificate is valid and up-to-date
  2. Try updating the BrowserPrint Service to the latest version

If none of these work, you might want to:

CONTACT
Can’t find what you’re looking for?