senny / pdfjs_viewer-rails

PDF.js viewer packaged as a Rails engine.
MIT License
114 stars 174 forks source link

Disable cross-origin check #16

Closed MattFenelon closed 8 years ago

MattFenelon commented 8 years ago

The viewer for PDF.js does its own cross-origin checks, refusing to load any remote PDFs, which stops the viewer loading PDFs from CDNs or remote storage locations, such as S3.

siegy22 commented 8 years ago

I don't think it's the way to comment out the whole validation code.

I think the solution would be:

var HOSTED_VIEWER_ORIGINS = ['*'];

(at line 7145)

Or delete the all of the validations, but I think there's a reason why this is in here.

@senny What do you think?

senny commented 8 years ago

@MattFenelon can't we follow the suggestion in #12 and make HOSTED_VIEWER_ORIGINS configurable?

MattFenelon commented 8 years ago

Closed by #20

fatuhoku commented 7 years ago

What's... the latest on this