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:
+4
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user