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 {
1192
1192
'application/octet-stream' ;
1193
1193
return shelf.Response .ok (bytes, headers: < String , String > {
1194
1194
'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 > {
1196
1198
'Cross-Origin-Opener-Policy' : 'same-origin' ,
1197
1199
'Cross-Origin-Embedder-Policy' : 'require-corp' ,
1198
1200
}
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ void main() {
59
59
60
60
expect (response.headers, < String , String > {
61
61
'Content-Type' : 'image/png' ,
62
+ 'Cross-Origin-Resource-Policy' : 'cross-origin' ,
63
+ 'Access-Control-Allow-Origin' : '*' ,
62
64
'content-length' : '64' ,
63
65
});
64
66
});
@@ -79,6 +81,8 @@ void main() {
79
81
80
82
expect (response.headers, < String , String > {
81
83
'Content-Type' : 'text/javascript' ,
84
+ 'Cross-Origin-Resource-Policy' : 'cross-origin' ,
85
+ 'Access-Control-Allow-Origin' : '*' ,
82
86
'content-length' : '18' ,
83
87
});
84
88
});
@@ -99,6 +103,8 @@ void main() {
99
103
100
104
expect (response.headers, < String , String > {
101
105
'Content-Type' : 'text/html' ,
106
+ 'Cross-Origin-Resource-Policy' : 'cross-origin' ,
107
+ 'Access-Control-Allow-Origin' : '*' ,
102
108
'content-length' : '28' ,
103
109
});
104
110
});
You can’t perform that action at this time.
0 commit comments