# CSP error Iframe

**URL:** <https://community.appfarm.io/t/csp-error-iframe/563>\
**Category:** Ask the community\
**Created:** [July 7, 2023, 8:11am UTC](https://community.appfarm.io/t/csp-error-iframe/563 "2023-07-07T08:11:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReodorMagnus](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/reodormagnus/32/1473_2.png) [@ReodorMagnus](https://community.appfarm.io/u/ReodorMagnus)\
**Post date:** [July 7, 2023, 8:11am UTC](https://community.appfarm.io/t/csp-error-iframe/563/1 "2023-07-07T08:11:16Z")

</div>

Hi!

![Skjermbilde 2023-07-07 kl. 09.53.05](https://europe1.discourse-cdn.com/flex013/uploads/appfarm/original/1X/70b1d2e97703a7b95a2cd5e84e78653d38025722.png)

This is a strange one.

I’ve whitelisted youtube in the CSP directive “content security” under environment and when I copy paste a link directly into the iframe “url” field it all works fine. However, I created an action that uploads urls to a datasource so its possible to switch the video showing in the iframe depending on the object in context.

If i just whitelist [https://storage.googleapis.com/](https://storage.googleapis.com/) a file is downloaded automatically when the user loads the view with the data source connected Iframe.

Help…

---

<div class="post-metadata">

**Author:** ![HJT](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/hjt/32/64_2.png) [@HJT](https://community.appfarm.io/u/HJT)\
**Post date:** [July 10, 2023, 7:38am UTC](https://community.appfarm.io/t/csp-error-iframe/563/2 "2023-07-10T07:38:39Z")

</div>

Hi,

you can use the internet URL as a property on a object to show the correct video based on the context. In this case you don’t need a file object.

Then you just need to whitelist the different video hosting services the links are coming from (ex. Youtube, Vimeo etc)
