mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-18 21:30:12 +01:00
fix: disable js execution on raw file view
This commit is contained in:
parent
24e100bd7b
commit
9d1a12b0d1
@ -26,7 +26,13 @@ export class FileController {
|
|||||||
@SkipThrottle()
|
@SkipThrottle()
|
||||||
@UseGuards(CreateShareGuard, ShareOwnerGuard)
|
@UseGuards(CreateShareGuard, ShareOwnerGuard)
|
||||||
async create(
|
async create(
|
||||||
@Query() query: any,
|
@Query()
|
||||||
|
query: {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
chunkIndex: string;
|
||||||
|
totalChunks: string;
|
||||||
|
},
|
||||||
@Body() body: string,
|
@Body() body: string,
|
||||||
@Param("shareId") shareId: string,
|
@Param("shareId") shareId: string,
|
||||||
) {
|
) {
|
||||||
@ -69,6 +75,7 @@ export class FileController {
|
|||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": file.metaData.mimeType,
|
"Content-Type": file.metaData.mimeType,
|
||||||
"Content-Length": file.metaData.size,
|
"Content-Length": file.metaData.size,
|
||||||
|
"Content-Security-Policy": "script-src 'none'",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (download === "true") {
|
if (download === "true") {
|
||||||
|
Loading…
Reference in New Issue
Block a user