UNPKG

p3x-redis-ui-server

Version:

🏍️ P3X Redis UI server — Socket.IO backend for the dual Angular + React frontend with AI queries, 54 languages, and auto data decompression

2 lines (1 loc) 566 B
export default function(t,e){const s=function(t){const e=Array.isArray(t)?t[0]:t;if("object"==typeof e&&null!==e)return e}(e);let r=t.redisOptions;return void 0===r&&(r={},t.redisOptions=r),void 0===r.password&&(r.password=s.password),s.tlsWithoutCert?r.tls={servername:s.host}:"string"==typeof s.tlsCa&&""!==s.tlsCa.trim()&&(r.tls={cert:s.tlsCrt,key:s.tlsKey,ca:s.tlsCa,servername:s.host}),r.hasOwnProperty("tls")&&(r.tls.rejectUnauthorized=void 0!==r.tlsRejectUnauthorized&&r.tlsRejectUnauthorized,r.tls.hasOwnProperty("servername")||(r.tls.servername=s.host)),t}