Skip to content

Commit b530ec7

Browse files
authored
Merge pull request #23734 from jrafanie/add-csp-fallbacks
Add csp fallbacks
2 parents 2c64826 + b5916dd commit b530ec7

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

config/initializers/secure_headers.rb

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,19 @@
2727
:report_only => false,
2828
:report_uri => ["/dashboard/csp_report"],
2929

30-
:default_src => ["'self'"],
31-
:connect_src => ["'self'"],
32-
:font_src => ["'self'", 'https://fonts.gstatic.com', "https://fonts.googleapis.com"],
33-
:frame_src => ["'self'"],
34-
:img_src => ["'self'", "data:"],
35-
:object_src => ["'self'"],
36-
:script_src => ["'unsafe-eval'", "'unsafe-inline'", "'self'"],
37-
:style_src => ["'unsafe-inline'", "'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"]
30+
:base_uri => ["'self'"],
31+
:default_src => ["'self'"],
32+
:child_src => ["'self'"],
33+
:connect_src => ["'self'"],
34+
:font_src => ["'self'", 'https://fonts.gstatic.com', "https://fonts.googleapis.com"],
35+
:form_action => ["'self'"],
36+
:frame_ancestors => ["'self'"],
37+
:frame_src => ["'self'"],
38+
:img_src => ["'self'", "data:"],
39+
:object_src => ["'self'"],
40+
:script_src => ["'unsafe-eval'", "'unsafe-inline'", "'self'"],
41+
:style_src => ["'unsafe-inline'", "'self'", "https://fonts.googleapis.com", "https://fonts.gstatic.com"],
42+
:worker_src => ["'self'"]
3843
}
3944
end
4045
end

0 commit comments

Comments
 (0)