File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,14 @@ def call(env)
51
51
]
52
52
end
53
53
54
- # If the CDO. allowed_iframe_ancestors configuration variable is
54
+ # If the DCDO or CDO allowed_iframe_ancestors configuration variable is
55
55
# defined, override the default SAMEORIGIN policy to allow the
56
56
# specified source list (as described in
57
57
# http://w3c.github.io/webappsec-csp/#source-lists) to frame our
58
58
# content.
59
- if CDO . allowed_iframe_ancestors
60
- policies << "frame-ancestors 'self' #{ CDO . allowed_iframe_ancestors } "
59
+ allowed_iframe_ancestors = DCDO . get ( 'allowed_iframe_ancestors' , nil ) || CDO . allowed_iframe_ancestors
60
+ if allowed_iframe_ancestors
61
+ policies << "frame-ancestors 'self' #{ allowed_iframe_ancestors } "
61
62
62
63
# Clear the older X-Frame-Options header because it doesn't support
63
64
# multiple domains. We need to clear this because on Chrome,
You can’t perform that action at this time.
0 commit comments