Skip to content

Commit 9686c99

Browse files
committed
Set secure based on env var
1 parent 87b277b commit 9686c99

File tree

1 file changed

+1
-3
lines changed
  • services/backend-api/src

1 file changed

+1
-3
lines changed

services/backend-api/src/app.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ declare module "fastify" {
4141
export async function createApp(
4242
container: Container,
4343
): Promise<FastifyInstance> {
44-
const isProduction = container.config.NODE_ENV === "production";
45-
4644
const app = Fastify({
4745
logger: false,
4846
trustProxy: true,
@@ -85,7 +83,7 @@ export async function createApp(
8583
cookie: {
8684
path: "/",
8785
httpOnly: true,
88-
secure: isProduction,
86+
secure: container.config.BACKEND_API_SESSION_COOKIE_SECURE,
8987
},
9088
});
9189

0 commit comments

Comments
 (0)