Adding CSP is supported in discourse through settings so you don’t need to do anything with nginx. See: