This does not work for local html & local file. Sample html is below: --- <html> <body> <script type="text/javascript" src="https://mozilla.github.io/pdf.js/build/pdf.js"></script> <script type="text/javascript" src="https://mozilla.github.io/pdf.js/build/pdf.worker.js"></script> <script type="text/javascript"> var url = "file:///Users/amagaiwork/Desktop/sample.pdf"; var pages = [], heights = [], width = 0, height = 0, currentPage = 1; var scale = 1.5; function draw() { var ca... Show more
CORS Unblock is a plugin that addresses CORS errors by manipulating 'Access-Control-Allow-Origin' and other related headers for both local and remote web requests
It also provides additional features such as removing CSP-related headers, overwriting server status codes, and modifying headers for cross-origin frame embedding
The plugin is essential for developers working on web applications that require cross-origin resource sharing