updated comments and added CSP header check in the tests

This commit is contained in:
Gani Georgiev 2022-07-21 17:22:31 +03:00
parent 4c2cd5a534
commit 7926501649
1 changed files with 13 additions and 11 deletions

View File

@ -180,11 +180,11 @@ func TestFileSystemServe(t *testing.T) {
"Content-Disposition": "attachment; filename=test_name.txt",
"Content-Type": "application/octet-stream",
"Content-Length": "0",
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
},
},
// png inline
{
// svg exception
// png inline
"image.png",
"test_name.png",
false,
@ -192,6 +192,7 @@ func TestFileSystemServe(t *testing.T) {
"Content-Disposition": "inline; filename=test_name.png",
"Content-Type": "image/png",
"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-Type": "image/svg+xml",
"Content-Length": "0",
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
},
},
}