enable CORS?
i want to deploy pdf.js to insert pdf from other website url(viewer.html?file=url…) to my WordPress,but when i do this ,the devtools console warn me that i need allow origin… to use(image Below)
what can i do? or what some plugins i should install to Achieve goals?
Website URL
html5syt.eu.org (temporary disable cf cdn)
html5syt.cf(open cf cdn)
Error Message
Other Information
i modify the viewer.js to allow the cors file,because the pdf.js not allowed doing so.
Welcome back to the forum! You might be limited by this security system:
InfinityFree is a website hosting service. That means that the hosting accounts we provided are intended for hosting websites. Websites contain pages that are accessed through web browsers. InfinityFree is not intended to be used for file sharing, API hosting, database hosting or background tasks/tools.
To help enforce this, free hosting enforces a security system that makes sure that anyone trying to access your website is using a normal web browser. This is done by checking whether the web br…
Also what @KangJL said.
6 Likes
KangJL
September 2, 2023, 11:52am
3
Free hosting does not allow CORS
5 Likes
oh,no…
so can i use other service to insert pdf like: <iframe :src… and the src link is from other website?
Please forgive my bad English:-( I’m Chinese
Unfortunately not, no. Infinityfree is meant for website hosting, not file storage.
6 Likes
Admin
September 3, 2023, 11:17am
6
If you have website A that embeds a page from website B in an iframe, then website B cannot be hosted by us, regardless of where website A is hosted.
You can embed a page from somewhere else on your website hosted here, but you cannot embed a page hosted here in another site.
5 Likes
system
Closed
September 10, 2023, 11:17am
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.