Restrict hotlink mimeType to image/* and harden image responses.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { IsMimeType, IsNotEmpty, IsString } from 'class-validator';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
import { IsImageMimeType } from '../../../validation/decorators/isImageMimeType';
|
||||
import { UploadCiphertextOptionsDto } from './UploadCiphertextOptionsDto';
|
||||
|
||||
export class CreateHotlinkUploadDto extends UploadCiphertextOptionsDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
@IsMimeType()
|
||||
@IsImageMimeType()
|
||||
mimeType: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user