Update PDF.js
To update PDF.js:
- Go to https://github.com/mozilla/pdf.js/releases/latest and download the - pdfjs-<VERSION>-dist.zipfile.
- Remove the old files: - git rm -r asset/vendor/pdf.js 
- Extract the .zip file contents inside - asset/vendor/pdf.js:- unzip pdfjs-<VERSION>-dist.zip -d asset/vendor/pdf.js 
- Edit - asset/vendor/pdf.js/web/viewer.jsand add- window.location.originto- HOSTED_VIEWER_ORIGINS. It should look like this:- const HOSTED_VIEWER_ORIGINS = ["null", "http://mozilla.github.io", "https://mozilla.github.io", window.location.origin]; 
- Commit! - git add asset/vendor/pdf.js && git commit -m 'Update PDF.js to <VERSION>'