satorumurmur / bibi

Bibi | EPUB Reader on your website.
https://bibi.epub.link
MIT License
843 stars 123 forks source link

Embedding epub hosted on Github to blog post. #59

Closed bongobond closed 4 years ago

bongobond commented 5 years ago

Hi,

I have some epub files hosted on Github. Is there any way I can use the epub files hosted on Github to embed those in my blog site?

For clarification, the bibi is hosted my personal site.

Thanks

satorumurmur commented 4 years ago

If https://example.com allows CORS, setting the "trustworthy-origins" in bibi/presets/default.js as ["https://example.com"], you can open EPUBs hosted on https://example.com by Bibi installed to another origin.

However, if anyone other than you also can put EPUBs to https://example.com, you should set "allow-scripts-in-content" in bibi/presets/default.js as false.

Otherwise, guests of your blog may run malicious scripts contained in the EPUB which is installed by someone evil, as the content of your blog.