From c4d253e6a8b9d1a491b502c90968b11eacd39821 Mon Sep 17 00:00:00 2001 From: walnuts1018 Date: Wed, 8 Nov 2023 00:19:18 +0900 Subject: [PATCH] Update Redis configuration to use Sentinel. --- front/src/app/api/auth/[...nextauth]/options.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/front/src/app/api/auth/[...nextauth]/options.ts b/front/src/app/api/auth/[...nextauth]/options.ts index 8f6e4f8..6780837 100644 --- a/front/src/app/api/auth/[...nextauth]/options.ts +++ b/front/src/app/api/auth/[...nextauth]/options.ts @@ -6,10 +6,12 @@ import crypto from 'crypto'; import AsyncLock from 'async-lock'; const redis = new Redis({ - host: process.env.REDIS_HOST, - port: 6379, - password: process.env.REDIS_PASSWORD, - db: 0, + sentinels: [{ + host: process.env.REDIS_HOST, + port: 26379, + }], + sentinelPassword: process.env.REDIS_PASSWORD, + name: "mymaster" }); const cachePassword = process.env.CACHE_PASSWORD || "password";