Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

happy new year,how i cross domain use the bibireader #107

Open
txb2d opened this issue Jan 1, 2021 · 3 comments
Open

happy new year,how i cross domain use the bibireader #107

txb2d opened this issue Jan 1, 2021 · 3 comments

Comments

@txb2d
Copy link

txb2d commented Jan 1, 2021

**e.g:**http://www.lsjxw.cn/res/txb/js/epubreader/bibi/index.html?book=http://kod.ls123.site/txbmicloudWP4rvk20200829213816.epub
the console:
Access to XMLHttpRequest at 'http://kod.ls123.site/txbmicloudWP4rvk20200829213816.epub/META-INF/container.xml' from origin 'http://www.lsjxw.cn' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
bibi.js:11 Failed to open the book (as a file: Data Invalid / as a folder: Probably CORS Blocked)
log @ bibi.js:11
U.error @ bibi.js:11
Promise.catch (async)
x.hello @ bibi.js:11
(anonymous) @ bibi.js:11
document.addEventListener.e @ bibi.js:11
(anonymous) @ bibi.js:11
bibi.js:11 GET http://kod.ls123.site/txbmicloudWP4rvk20200829213816.epub/META-INF/container.xml net::ERR_FAILED
(anonymous) @ bibi.js:11
U.download @ bibi.js:11
s @ bibi.js:11
(anonymous) @ bibi.js:11
Promise.catch (async)
or @ bibi.js:11
(anonymous) @ bibi.js:11
initializeBook @ bibi.js:11
(anonymous) @ bibi.js:11
Promise.then (async)
x.loadBook @ bibi.js:11
Promise.then (async)
x.hello @ bibi.js:11
(anonymous) @ bibi.js:11
document.addEventListener.e @ bibi.js:11
(anonymous) @ bibi.js:11

the curl:
curl -I http://kod.ls123.site/txbmicloudWP4rvk20200829213816.epub
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Fri, 01 Jan 2021 02:47:24 GMT
Content-Type: application/epub+zip
Content-Length: 149803
Last-Modified: Sat, 26 Dec 2020 13:58:17 GMT
Connection: keep-alive
ETag: "5fe74179-2492b"
Access-Control-Allow-Origin: *
Accept-Ranges: bytes

but the same file if not in other domain display well
http://www.lsjxw.cn/res/txb/js/epubreader/bibi/index.html?book=http://www.lsjxw.cn/txbmicloudWP4rvk20200829213816.epub
the console
Bibi: 📕 Hello! (v1.2.0)
the curl
curl -I http://www.lsjxw.cn/txbmicloudWP4rvk20200829213816.epub
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Fri, 01 Jan 2021 03:07:30 GMT
Content-Type: application/epub+zip
Content-Length: 149803
Last-Modified: Thu, 31 Dec 2020 17:52:26 GMT
Connection: keep-alive
ETag: "5fee0fda-2492b"
Access-Control-Allow-Origin: *
Accept-Ranges: bytes

i want to get the auther 's help!!!!!!!thanks

@txb2d
Copy link
Author

txb2d commented Jan 1, 2021

why the "META-INF/container.xml" add to the bottom!?????

@txb2d
Copy link
Author

txb2d commented Jan 1, 2021

who can give me a success e.g of the cross domain use the ngnix

@WeCre8Dev
Copy link

why the "META-INF/container.xml" add to the bottom!?????

I have set the CORS settings on my DigitalOcean Spaces and yet it didn't work for me. please help me. why request adding /META-INF/container.xml to the end of epub file url?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants