Sometimes we need to fetch static resources (PDF files, images, videos etc)from a server via a HTTP client in the browser, eg. AJAX, Fetch or Axios. So we try this in JavaScript:
fetch('https://mysite.com/assets/some_pdf.pdf);
But we see our good old friend CORS error :)
Resource from origin 'https://mysite.com' has been…