You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using multiple instances (web applications) running on different ports generating some PDFs with vue-pdfmake.
Unfortunately on Chrome and Edge, XMLHttpRequests are blocked by CORS policy because it caches the origin header on an instance.
For example:
I'm generating a simple PDF running on a web server with port 8030 which loads a custom font from another web server running on port 8001. So far so good.
As soon as I try to generate another PDF with pdfmake running on another web server with port 8031, trying to access the same custom font on port 8001, it fails with the following message:
Access to XMLHttpRequest at 'http://SERVER:8001/fonts/some_font.otf' from origin 'http://SERVER:8031' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://SERVER:8030' that is not equal to the supplied origin.
Is there a way to disable caching header data on XMLHttpRequests? As soon as I delete browser cache or if I'm using a private session, it works again.
I'm using vue 3.2.13 with vue3-pdfmake 2.2.0.
Thanks and regards
The text was updated successfully, but these errors were encountered:
Hello
We're using multiple instances (web applications) running on different ports generating some PDFs with vue-pdfmake.
Unfortunately on Chrome and Edge, XMLHttpRequests are blocked by CORS policy because it caches the origin header on an instance.
For example:
Access to XMLHttpRequest at 'http://SERVER:8001/fonts/some_font.otf' from origin 'http://SERVER:8031' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://SERVER:8030' that is not equal to the supplied origin.
Is there a way to disable caching header data on XMLHttpRequests? As soon as I delete browser cache or if I'm using a private session, it works again.
I'm using vue 3.2.13 with vue3-pdfmake 2.2.0.
Thanks and regards
The text was updated successfully, but these errors were encountered: