mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
puppet: Fix buggy media-src Content-Security-Policy.
The colon is invalid syntax. Verified the updated policy using an online CSP checker.
This commit is contained in:
committed by
Alex Vandiver
parent
5697084832
commit
b59e90d100
@@ -2,7 +2,7 @@
|
|||||||
location ~ ^/internal/s3/(?<s3_hostname>[^/]+)/(?<s3_path>.*) {
|
location ~ ^/internal/s3/(?<s3_hostname>[^/]+)/(?<s3_path>.*) {
|
||||||
internal;
|
internal;
|
||||||
include /etc/nginx/zulip-include/headers;
|
include /etc/nginx/zulip-include/headers;
|
||||||
add_header Content-Security-Policy "default-src 'none'; media-src: 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; object-src 'self'; plugin-types application/pdf;";
|
add_header Content-Security-Policy "default-src 'none'; media-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; object-src 'self'; plugin-types application/pdf;";
|
||||||
|
|
||||||
# The components of this path are originally double-URI-escaped
|
# The components of this path are originally double-URI-escaped
|
||||||
# (see zerver/view/upload.py). "location" matches are on
|
# (see zerver/view/upload.py). "location" matches are on
|
||||||
@@ -46,7 +46,7 @@ location ~ ^/internal/s3/(?<s3_hostname>[^/]+)/(?<s3_path>.*) {
|
|||||||
location /internal/local/uploads {
|
location /internal/local/uploads {
|
||||||
internal;
|
internal;
|
||||||
include /etc/nginx/zulip-include/headers;
|
include /etc/nginx/zulip-include/headers;
|
||||||
add_header Content-Security-Policy "default-src 'none'; media-src: 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; object-src 'self'; plugin-types application/pdf;";
|
add_header Content-Security-Policy "default-src 'none'; media-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; object-src 'self'; plugin-types application/pdf;";
|
||||||
|
|
||||||
# Django handles setting Content-Type, Content-Disposition, and Cache-Control.
|
# Django handles setting Content-Type, Content-Disposition, and Cache-Control.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user