Skip to content

Instantly share code, notes, and snippets.

@yurydelendik
Last active August 7, 2023 14:01
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save yurydelendik/3452072 to your computer and use it in GitHub Desktop.
Save yurydelendik/3452072 to your computer and use it in GitHub Desktop.
CORS for pdf.js
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "http://mozilla.github.io"
</IfModule>
<iframe src="http://mozilla.github.io/pdf.js/web/viewer.html?file=http%3A%2F%2Fasync5.org%2Fmoz%2Fpdfjs.pdf" width="500" height="400"></iframe>
@shinegami1287
Copy link

hi yuri could you tell me where to put the .htaccess file and i have to reference to it somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment