# Внешний модуль nginx pagespeed вызывает нарушение политики безопасности

**URL:** <https://meta.discourse.org/t/external-nginx-pagespeed-module-causes-security-policy-violation/121336>\
**Category:** Self-hosting\
**Created:** [25.Июнь.2019 23:59:38 UTC](https://meta.discourse.org/t/external-nginx-pagespeed-module-causes-security-policy-violation/121336 "2019-06-25T23:59:38Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![34563463456](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/34563463456/32/141024_2.png) [@34563463456](https://meta.discourse.org/u/34563463456)\
**Post date:** [25.Июнь.2019 23:59:39 UTC](https://meta.discourse.org/t/external-nginx-pagespeed-module-causes-security-policy-violation/121336/1 "2019-06-25T23:59:39Z")

</div>

I have posted the detail question on Stack Overflow: [https://stackoverflow.com/questions/56763156/discourse-email-activation-no-longer-works-due-to-content-security-policy-violat](https://stackoverflow.com/questions/56763156/discourse-email-activation-no-longer-works-due-to-content-security-policy-violat)

I boostrapped discourse using my custom `app.yml` which uses the cloudflare template like so:

```
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/web.socketed.template.yml"
  - "templates/sshd.template.yml"
  - "templates/cloudflare.template.yml"

```

Then I bootstrapped the image like so:

```
./launcher bootstrap app &&\
./launcher start app

```

I then register my account, and try clicking on the activation link on my discourse page, and NOTHING happens. Looking at dev tools, I see this error:

```
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'report-sample' http://myfancydomain.com/logs/ http://myfancydomain.com/sidekiq/ http://myfancydomain.com/mini-profiler-resources/ http://myfancydomain.com/assets/ http://myfancydomain.com/brotli_asset/ http://myfancydomain.com/extra-locales/ http://myfancydomain.com/highlight-js/ http://myfancydomain.com/javascripts/ http://myfancydomain.com/plugins/ http://myfancydomain.com/theme-javascripts/ http://myfancydomain.com/svg-sprite/". Either the 'unsafe-inline' keyword, a hash ('sha256-T1n9N/v2ZUyCGncqaO0MgcESijK4iDg9nXYaamEO+bY='), or a nonce ('nonce-...') is required to enable inline execution.

```

I have NO clue what this error means - any clues as to how to solve it would be great.

---

_[View the full topic](https://meta.discourse.org/t/external-nginx-pagespeed-module-causes-security-policy-violation/121336)._
