Add GET /i/:id/:secret hotlink image decrypt stream.
This commit is contained in:
+4
-2
@@ -1,4 +1,4 @@
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { RequestMethod, ValidationPipe } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
@@ -12,7 +12,9 @@ import { HttpMethod } from './types/HttpMethod';
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule, { bodyParser: false });
|
||||
|
||||
app.setGlobalPrefix('api');
|
||||
app.setGlobalPrefix('api', {
|
||||
exclude: [{ path: 'i/:id/:secret', method: RequestMethod.GET }]
|
||||
});
|
||||
|
||||
const configService = app.get(ConfigService);
|
||||
const altchaService = app.get(AltchaService);
|
||||
|
||||
Reference in New Issue
Block a user