file origin does not match viewer's pdf.js
1. If you're trying to do a crossorigin load you must add your origin in the array
var HOSTED_VIEWER_ORIGINS = ['null', '...', 'yourorigin'];
2. check the protocol from the origin you are getting the resource.
example:
http://localhost/web/viewer.html?file=https://localhost/xx.pdf
turns into
http://localhost/web/viewer.html?file=http://localhost/xx.pdf
Also in JavaScript:
- js navigate to another page
- click anchor tag using jquery
- saveas angular 6
- select input by name javascript
- js loop trough map
- javascript switch statement multiple cases
- reactjs fix ios apostrophe encoding
- return an array of strings from an array of objects js
- deep clone array in javascript
- encrypt script code
- linear search js
- get and set es6
- javascript modal show
- vuejs enter phone with country flag
- use vue cdn with firestore
- inverser l'ordre des item d'un array js
- js throttle function
- javascript switch assignment
- node js if no arguments
- javascript get same elments from multiple arrays
- javascript convert date from mm/dd/yyyy to yyyymmdd
- add property to object javascript
- how to change css variable in javascript
- after load page jquery