Allow fonts to be served from asset host in CSP.

Closes #7796

closes #7825
This commit is contained in:
Alex Tribble 2018-06-10 18:41:21 +00:00 committed by Benjamin Neff
parent fa615533f6
commit 1b03265c2e
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 2 additions and 0 deletions

View file

@ -7,6 +7,7 @@
## Bug fixes ## Bug fixes
* Fix compatibility with newer glibc versions [#7828](https://github.com/diaspora/diaspora/pull/7828) * Fix compatibility with newer glibc versions [#7828](https://github.com/diaspora/diaspora/pull/7828)
* Allow fonts to be served from asset host in CSP [#7825](https://github.com/diaspora/diaspora/pull/7825)
## Features ## Features

View file

@ -21,6 +21,7 @@ SecureHeaders::Configuration.default do |config|
if AppConfig.environment.assets.host.present? if AppConfig.environment.assets.host.present?
asset_host = Addressable::URI.parse(AppConfig.environment.assets.host.get).host asset_host = Addressable::URI.parse(AppConfig.environment.assets.host.get).host
csp[:font_src] << asset_host
csp[:script_src] << asset_host csp[:script_src] << asset_host
csp[:style_src] << asset_host csp[:style_src] << asset_host
end end