Skip to content

Commit be93876

Browse files
committed
Add child_src and worker_src to CSP configuration
Aligns Rails CSP directives with Apache httpd configuration for consistency.
1 parent 2c64826 commit be93876

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

config/initializers/secure_headers.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@
2828
:report_uri => ["/dashboard/csp_report"],
2929

3030
:default_src => ["'self'"],
31+
:child_src => ["'self'"],
3132
:connect_src => ["'self'"],
3233
:font_src => ["'self'", 'https://fonts.gstatic.com', "https://fonts.googleapis.com"],
3334
:frame_src => ["'self'"],
3435
:img_src => ["'self'", "data:"],
3536
:object_src => ["'self'"],
3637
:script_src => ["'unsafe-eval'", "'unsafe-inline'", "'self'"],
37-
:style_src => ["'unsafe-inline'", "'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"]
38+
:style_src => ["'unsafe-inline'", "'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
39+
:worker_src => ["'self'"]
3840
}
3941
end
4042
end

0 commit comments

Comments
 (0)