# Añade soporte para CSP nonce-source

**URL:** <https://meta.discourse.org/t/add-csp-nonce-source-support/93300>\
**Category:** Development\
**Created:** [27 Julio, 2018 16:19 UTC](https://meta.discourse.org/t/add-csp-nonce-source-support/93300 "2018-07-27T16:19:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![claudijd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/claudijd/32/119716_2.png) [@claudijd](https://meta.discourse.org/u/claudijd)\
**Post date:** [27 Julio, 2018 17:27 UTC](https://meta.discourse.org/t/add-csp-nonce-source-support/93300/2 "2018-07-27T17:27:46Z")

</div>

I caught up with Leo out of band, but wanted to capture my understanding in my own words to help with clarity. First, I think this is a good step for making it easier for Discourse instance owners to strengthen their CSP policies, which would be awesome.

**Pain Point / Problem:**

Discourse implementation owners that wish to deploy CSP for their instance have to add ‘unsafe-inline’ to their CSP policies to get it to work. This addition nearly invalidates the value of having a CSP policy if an XSS vector was to present itself in that context.

**Here’s my interpretation of this…**

1.) (PROPOSAL FROM LEO) All inline script content would contain nonce-source (this eliminates the need for using ‘unsafe-inline’ in a CSP policy to support core Discourse functions and gives the CSP policy meaning/value for inline XSS contexts)

2.) (ANOTHER THING TO CONSIDER - May be out of scope of Leo’s proposal) Upstream would need to consider what the default preference would be for external script content loads (there’s always a few and might be subject to change, and maybe that gives people heartburn). My suggestion would be to be permissive for external loads in upstream by default and have some security guidance that suggests how someone could dial it in and be very explicit about their external resources and fully lock down the CSP policy.

---

_[View the full topic](https://meta.discourse.org/t/add-csp-nonce-source-support/93300)._
