From 064a886775a49e8bf13fd4e55b12cc7e67f21a4c Mon Sep 17 00:00:00 2001 From: Expand-sys Date: Fri, 23 Dec 2022 15:46:45 +1100 Subject: [PATCH] small patch to use secure cookies only when secure --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 66aee24..eff5d1b 100644 --- a/index.js +++ b/index.js @@ -29,7 +29,7 @@ fastify.register(require("fastify-secure-session"), { cookie: { path: "/", // options for setCookie, see https://github.com/fastify/fastify-cookie - secure: true, + secure: `${process.env.SECURE}`, httpOnly: true, overwrite: true, },