senny / pdfjs_viewer-rails

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

Viewer origins #18

Open siegy22 opened 8 years ago

siegy22 commented 8 years ago

closes #12, closes #16

@andyweiss1982 and @senny have a 👀

senny commented 8 years ago

@MattFenelon can you get your use-case to work with this addition?

senny commented 8 years ago

@siegy22 A test-case needs to make sure the env variable has an effect. Otherwise we are going to loose this on an update.

senny commented 8 years ago

Let's wait for feedback if this addresses the need voiced by others.

siegy22 commented 8 years ago

That's okay for me 👌

MattFenelon commented 8 years ago

This looks great, thanks for looking at it. I won't be able to test it until Monday now.

As you own _viewer.html, rather than change viewer.js, could you modify HOSTED_VIEWER_ORIGINS in a js file loaded after viewer.js?

siegy22 commented 8 years ago

Hey @MattFenelon I opened another pr ( #19 )

I explored a little "bug" in the code. Gonna fix this tommorow!

fatuhoku commented 7 years ago

What's the latest on this?

monochrome-particles commented 7 years ago

Any updates on this? When are you planning to merge this? I would really like to have configurable origins :'(

raykin commented 7 years ago

it's useful when viewing PDF saved in S3 or cloud service