diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 4c20f831e..e0e7daf2f 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -7,7 +7,7 @@ import helmet from 'helmet'; import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; -import { StaticMiddleware } from './middlewares/static.middleware'; +import { HtmlTemplateMiddleware } from './middlewares/html-template.middleware'; async function bootstrap() { const configApp = await NestFactory.create(AppModule); @@ -53,7 +53,7 @@ async function bootstrap() { ); } - app.use(StaticMiddleware); + app.use(HtmlTemplateMiddleware); const BASE_CURRENCY = configService.get('BASE_CURRENCY'); const HOST = configService.get('HOST') || '0.0.0.0'; diff --git a/apps/api/src/middlewares/static.middleware.ts b/apps/api/src/middlewares/html-template.middleware.ts similarity index 99% rename from apps/api/src/middlewares/static.middleware.ts rename to apps/api/src/middlewares/html-template.middleware.ts index a160a6ff1..efbd60fa7 100644 --- a/apps/api/src/middlewares/static.middleware.ts +++ b/apps/api/src/middlewares/html-template.middleware.ts @@ -89,7 +89,7 @@ const isFileRequest = (filename: string) => { return filename.split('.').pop() !== filename; }; -export const StaticMiddleware = async ( +export const HtmlTemplateMiddleware = async ( request: Request, response: Response, next: NextFunction