From 64706fd5059f94b7c98763c69755c9e11dbc1845 Mon Sep 17 00:00:00 2001 From: resqiar Date: Thu, 19 Aug 2021 00:33:50 +0700 Subject: [PATCH] fix: unable to redirect after login when cookie samesite set to strict (no idea why) --- dikser/src/main.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dikser/src/main.ts b/dikser/src/main.ts index e145be1..e593184 100644 --- a/dikser/src/main.ts +++ b/dikser/src/main.ts @@ -9,7 +9,7 @@ import * as passport from 'passport' import * as redis from 'redis' import * as connectRedis from 'connect-redis' import { Client } from 'connect-redis' -// import * as helmet from 'helmet' +import * as helmet from 'helmet' async function bootstrap() { const app = await NestFactory.create(AppModule) @@ -29,19 +29,19 @@ async function bootstrap() { * Helmet configurations * @see https://github.com/helmetjs/helmet#how-it-works */ - // app.use( - // helmet({ - // frameguard: { - // action: 'deny', - // }, - // crossOriginResourcePolicy: { policy: 'same-site' }, - // crossOriginEmbedderPolicy: true, - // crossOriginOpenerPolicy: true, - // dnsPrefetchControl: { - // allow: true, - // }, - // }) - // ) + app.use( + helmet({ + frameguard: { + action: 'deny', + }, + crossOriginResourcePolicy: { policy: 'same-site' }, + crossOriginEmbedderPolicy: true, + crossOriginOpenerPolicy: true, + dnsPrefetchControl: { + allow: true, + }, + }) + ) // Redis config const REDIS_URI = process.env.REDIS_TLS_URL