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:
2026-11-02 00:24:02 +01:00
parent c97303850a
commit 0ef4993ad9
5 changed files with 118 additions and 4 deletions
@@ -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;
}