@@ -12,7 +12,7 @@ const { CfEnv } = require("./shared/cf-env");
1212const { Logger } = require ( "./shared/logger" ) ;
1313const { HandlerCollection } = require ( "./shared/handler-collection" ) ;
1414const { Semaphore } = require ( "./shared/semaphore" ) ;
15- const { tryJsonParse, isObject } = require ( "./shared/static" ) ;
15+ const { tryJsonParse } = require ( "./shared/static" ) ;
1616
1717const COMPONENT_NAME = "/RedisAdapter" ;
1818const VERROR_CLUSTER_NAME = "RedisAdapterError" ;
@@ -108,9 +108,13 @@ const _createClientBase = (clientName) => {
108108 host,
109109 port,
110110 ...__clientOptions ?. socket ,
111+ // NOTE: Azure and GCP have an object in their service binding credentials under tls, however it's filled
112+ // with nonsensical values like:
113+ // - "ca": "null", a literal string spelling null, or
114+ // - "server_ca": "null", where "server_ca" is not a recognized property that could be set on a socket.
115+ // For reference: https://nodejs.org/docs/latest-v22.x/api/tls.html#tlscreatesecurecontextoptions
116+ // NOTE: We normalize the tls value to boolean here, because @redis/client needs a boolean.
111117 tls : ! ! ( __clientOptions ?. socket ?. tls ?? tls ) ,
112- ...( isObject ( tls ) && tls ) ,
113- ...( isObject ( __clientOptions ?. socket ?. tls ) && __clientOptions ?. socket ?. tls ) ,
114118 } ,
115119 } ;
116120
0 commit comments