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
+4 -1
View File
@@ -14,7 +14,10 @@ async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule, { bodyParser: false });
app.setGlobalPrefix('api', {
exclude: [{ path: 'i/:id/:secret', method: RequestMethod.GET }]
exclude: [
{ path: 'i/:id/:secret', method: RequestMethod.GET },
{ path: 'i/:accessToken', method: RequestMethod.GET }
]
});
const configService = app.get(ConfigService);