# Setup Cross-Origin Resource Sharing (CORS)

**URL:** <https://meta.discourse.org/t/setup-cross-origin-resource-sharing-cors/270819>\
**Category:** Self-Hosting\
**Tags:** how-to\
**Created:** [July 6, 2023, 9:46pm UTC](https://meta.discourse.org/t/setup-cross-origin-resource-sharing-cors/270819 "2023-07-06T21:46:39Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Olle11](https://avatars.discourse-cdn.com/v4/letter/o/cdc98d/32.png) [@Olle11](https://meta.discourse.org/u/Olle11)\
**Post date:** [May 30, 2025, 9:57am UTC](https://meta.discourse.org/t/setup-cross-origin-resource-sharing-cors/270819/7 "2025-05-30T09:57:52Z")

</div>

Is this better to use than CSP if you want to use javascript in posts for example?

I have currently relied to theme components or CSP in order to run js,

Best regards  
Olle

---

_[View the full topic](https://meta.discourse.org/t/setup-cross-origin-resource-sharing-cors/270819)._
