# Adding apryse WebViewer

**URL:** https://community.appfarm.io/t/adding-apryse-webviewer/1740
**Category:** Ask the community
**Tags:** coded-component
**Created:** [March 20, 2025, 7:46am UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740 "2025-03-20T07:46:30Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![marcus.rognes](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@marcus.rognes](https://community.appfarm.io/u/marcus.rognes)
#### Post date: [March 20, 2025, 7:46am UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/1 "2025-03-20T07:46:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)
#### Post date: [March 20, 2025, 12:11pm UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/2 "2025-03-20T12:11:58Z")

</div>

Hi, and welcome to the Community!

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](https://docs.appfarm.io/reference/configuration/environments#content-security).

Rhys

---

<div class="post-metadata">

### Author: ![marcus.rognes](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@marcus.rognes](https://community.appfarm.io/u/marcus.rognes)
#### Post date: [March 20, 2025, 1:30pm UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/3 "2025-03-20T13:30:14Z")

</div>

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/](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) &nbsp;|&nbsp; Cloud Storage &nbsp;|&nbsp; Google Cloud](https://cloud.google.com/storage/docs/cross-origin#multiple-origins-methods-headers) 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)?

---

<div class="post-metadata">

### Author: ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)
#### Post date: [March 20, 2025, 3:20pm UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/4 "2025-03-20T15:20:13Z")

</div>

Hi,

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](https://stackoverflow.com/questions/67525595/cross-origin-request-blocked-the-same-origin-policy-disallows-reading-the-remot), which potentially points towards some settings in Firefox?

Some CORS errors can also be found described [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS/Errors) alongside potential advice.

Rhys

---

<div class="post-metadata">

### Author: ![marcus.rognes](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@marcus.rognes](https://community.appfarm.io/u/marcus.rognes)
#### Post date: [March 21, 2025, 8:25am UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/5 "2025-03-21T08:25:09Z")

</div>

I get the same issue in any browser I am using.  
Is there any way for us to set the CORS settings on the file bucket from AppFarm Create?

---

<div class="post-metadata">

### Author: ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)
#### Post date: [March 21, 2025, 9:52am UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/6 "2025-03-21T09:52:29Z")

</div>

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](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS#:~:text=The%20CORS%20mechanism%20supports%20secure,transfers%20between%20browsers%20and%20servers).

These CORS settings should be fixed in the file bucket itself, not from Appfarm Create.

Rhys

---

<div class="post-metadata">

### Author: ![marcus.rognes](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@marcus.rognes](https://community.appfarm.io/u/marcus.rognes)
#### Post date: [April 15, 2025, 8:44am UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/7 "2025-04-15T08:44:59Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)
#### Post date: [April 15, 2025, 11:17am UTC](https://community.appfarm.io/t/adding-apryse-webviewer/1740/8 "2025-04-15T11:17:33Z")

</div>

Hi! Glad to hear this issue is solved. Correct, this is not accessible through the settings inside Appfarm Create 🙂
