Hi!
I am trying to add Apryse WebViewer to an app, the WebViewer requires access to a folder where all of it`s assets are located, preferably hosted in such a way that webworkers work, is this possible to do with appfarm?
I know I can upload one and one file to the Resources → Files section, but this won`t work due the the nested structure of the folder and the large amount of files needed.
I have tried to host the WebViewer on a secondary website and load it through an iframe, but the iframe was not able to load the files from the bucket due to CORS restrictions.
This is an interesting use case, and not one that I have seen before.
The CORS restrictions you encountered - they can possibly be fixed by adding the right domain under “Frame Targets” under the correct Environment Settings.
Thanks!
I did add the domain to the Frame Targets, it is not that the iframe does not load, it is that the domain I used cant load images from https://storage.googleapis.com/
The error I get is: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource {INSERT_MY_DOMAIN_HERE}
If i go directly to my site, I still get the error.
What I am referring to is this: Cross-origin resource sharing (CORS) | Cloud Storage | Google Cloud I think.
Do we know if there is a restrictive CORS Origin policy on our bucket, or is it my NGINX configuration that is wrong (the host of my iframe)?
If the same error is experienced in the site itself, then this sounds like a problem outside of Appfarm Create. This becomes harder to answer here, but I’ll do my best.
I did some research around the error message and saw the following Stack Overflow thread, which potentially points towards some settings in Firefox?
Some CORS errors can also be found described here alongside potential advice.
Hi, Setting the CORS headers should be done server-side. Same-origin determines if the server allows web requests which come from a different origin than where it is hosted. You can read more in the docs here.
These CORS settings should be fixed in the file bucket itself, not from Appfarm Create.
Our architecture had to change, so this is not an issue anymore, but we would not have access to change the CORS of the file bucket AppFarm uses, right?