Serve hotlink images by single-segment access token URL.
Legacy GET /i/:uploadId/:secret unchanged. Lookup new uploads by access token hash; decrypt with token from path.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { IsNotEmpty } from 'class-validator';
|
||||
import { AES_GCM_KEY_BYTE_LENGTH } from '../../../consts/crypto/aesGcmKeyByteLength';
|
||||
import { IsBase64Url } from '../../../validation/decorators/isBase64Url';
|
||||
|
||||
export class HotlinkAccessTokenParamsDto {
|
||||
@IsNotEmpty()
|
||||
@IsBase64Url({ byteLength: AES_GCM_KEY_BYTE_LENGTH })
|
||||
accessToken: string;
|
||||
}
|
||||
Reference in New Issue
Block a user