updated comments and added CSP header check in the tests
This commit is contained in:
parent
4c2cd5a534
commit
7926501649
|
@ -180,11 +180,11 @@ func TestFileSystemServe(t *testing.T) {
|
||||||
"Content-Disposition": "attachment; filename=test_name.txt",
|
"Content-Disposition": "attachment; filename=test_name.txt",
|
||||||
"Content-Type": "application/octet-stream",
|
"Content-Type": "application/octet-stream",
|
||||||
"Content-Length": "0",
|
"Content-Length": "0",
|
||||||
|
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// png inline
|
|
||||||
{
|
{
|
||||||
// svg exception
|
// png inline
|
||||||
"image.png",
|
"image.png",
|
||||||
"test_name.png",
|
"test_name.png",
|
||||||
false,
|
false,
|
||||||
|
@ -192,6 +192,7 @@ func TestFileSystemServe(t *testing.T) {
|
||||||
"Content-Disposition": "inline; filename=test_name.png",
|
"Content-Disposition": "inline; filename=test_name.png",
|
||||||
"Content-Type": "image/png",
|
"Content-Type": "image/png",
|
||||||
"Content-Length": "73",
|
"Content-Length": "73",
|
||||||
|
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -203,6 +204,7 @@ func TestFileSystemServe(t *testing.T) {
|
||||||
"Content-Disposition": "attachment; filename=test_name.svg",
|
"Content-Disposition": "attachment; filename=test_name.svg",
|
||||||
"Content-Type": "image/svg+xml",
|
"Content-Type": "image/svg+xml",
|
||||||
"Content-Length": "0",
|
"Content-Length": "0",
|
||||||
|
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue