fix: 生产环境拒绝占位 SESSION_SECRET

This commit is contained in:
que01 committed 2026-10-23 12:26:45 +08:00
1 parent b4e3e86dcd
commit 4d9c84defc
5 files changed
+73 -2

No files matched your search

+2
View File
@@ -6,8 +6,10 @@ import multipart from "@fastify/multipart";
import fastifyStatic from "@fastify/static";
import path from "node:path";
import { AppModule, configureApp } from "./app.module.js";
import { assertProductionSecret } from "./runtime-config.js";
export async function createApp(): Promise<NestFastifyApplication> {
assertProductionSecret(process.env.SESSION_SECRET);
const app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter());
app
.getHttpAdapter()