Allow fonts to be served from asset host in CSP.
Closes #7796 closes #7825
This commit is contained in:
parent
fa615533f6
commit
1b03265c2e
2 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue