File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -114,16 +114,14 @@ def show_error_page(env, exception=nil)
114114 headers = {
115115 "Content-Type" => "text/#{ type } ; charset=utf-8" ,
116116 "Content-Security-Policy" => [
117- "default-src 'self' https:" , # TODO: remove https:?
118- "font-src 'self' https: data:" ,
119- "img-src 'self' https: data:" ,
120- "object-src 'none'" ,
117+ "default-src 'none'" ,
121118 # Specifying nonce makes a modern browser ignore 'unsafe-inline' which could still be set
122119 # for older browsers without nonce support.
123- "script-src 'self' https: 'nonce-#{ csp_nonce } ' 'unsafe-inline'" ,
120+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src
121+ "script-src 'self' 'nonce-#{ csp_nonce } ' 'unsafe-inline'" ,
124122 # Inline style is required by the syntax highlighter.
125- "style-src 'self' https: 'unsafe-inline'" ,
126- "connect-src 'self' https:" ,
123+ "style-src 'self' 'unsafe-inline'" ,
124+ "connect-src 'self'" ,
127125 ] . join ( '; ' ) ,
128126 }
129127
You can’t perform that action at this time.
0 commit comments