File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1192,7 +1192,9 @@ class ReleaseAssetServer {
11921192 'application/octet-stream' ;
11931193 return shelf.Response .ok (bytes, headers: < String , String > {
11941194 'Content-Type' : mimeType,
1195- if (_needsCoopCoep && file.basename == 'index.html' ) ...< String , String > {
1195+ 'Cross-Origin-Resource-Policy' : 'cross-origin' ,
1196+ 'Access-Control-Allow-Origin' : '*' ,
1197+ if (_needsCoopCoep && _fileSystem.path.extension (file.path) == '.html' ) ...< String , String > {
11961198 'Cross-Origin-Opener-Policy' : 'same-origin' ,
11971199 'Cross-Origin-Embedder-Policy' : 'require-corp' ,
11981200 }
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ void main() {
5959
6060 expect (response.headers, < String , String > {
6161 'Content-Type' : 'image/png' ,
62+ 'Cross-Origin-Resource-Policy' : 'cross-origin' ,
63+ 'Access-Control-Allow-Origin' : '*' ,
6264 'content-length' : '64' ,
6365 });
6466 });
@@ -79,6 +81,8 @@ void main() {
7981
8082 expect (response.headers, < String , String > {
8183 'Content-Type' : 'text/javascript' ,
84+ 'Cross-Origin-Resource-Policy' : 'cross-origin' ,
85+ 'Access-Control-Allow-Origin' : '*' ,
8286 'content-length' : '18' ,
8387 });
8488 });
@@ -99,6 +103,8 @@ void main() {
99103
100104 expect (response.headers, < String , String > {
101105 'Content-Type' : 'text/html' ,
106+ 'Cross-Origin-Resource-Policy' : 'cross-origin' ,
107+ 'Access-Control-Allow-Origin' : '*' ,
102108 'content-length' : '28' ,
103109 });
104110 });
You can’t perform that action at this time.
0 commit comments