Skip to content

Commit b3afbcf

Browse files
authored
Correctly configure redis cluster for aws elasticache (#1651)
1 parent f43de6a commit b3afbcf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

apps/webapp/app/redis.server.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,17 @@ export function createRedisClient(
4040
username: options.username,
4141
password: options.password,
4242
enableAutoPipelining: true,
43-
...(options.tlsDisabled ? {} : { tls: {} }),
43+
...(options.tlsDisabled
44+
? {
45+
checkServerIdentity: () => {
46+
// disable TLS verification
47+
return undefined;
48+
},
49+
}
50+
: { tls: {} }),
4451
},
52+
dnsLookup: (address, callback) => callback(null, address),
53+
slotsRefreshTimeout: 10000,
4554
});
4655
} else {
4756
logger.debug("Creating a redis client", {

0 commit comments

Comments
 (0)