mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-21 14:08:53 -04:00
Ignore TLS/SSL error for Redis (#3878)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
55b2d4b907
commit
daca38a554
4 changed files with 11 additions and 6 deletions
|
@ -486,12 +486,16 @@ exports.radius = function (
|
|||
/**
|
||||
* Redis server ping
|
||||
* @param {string} dsn The redis connection string
|
||||
* @returns {Promise<any>} Response from redis server
|
||||
* @param {boolean} rejectUnauthorized If false, allows unverified server certificates.
|
||||
* @returns {Promise<any>} Response from server
|
||||
*/
|
||||
exports.redisPingAsync = function (dsn) {
|
||||
exports.redisPingAsync = function (dsn, rejectUnauthorized) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const client = redis.createClient({
|
||||
url: dsn
|
||||
url: dsn,
|
||||
socket: {
|
||||
rejectUnauthorized
|
||||
}
|
||||
});
|
||||
client.on("error", (err) => {
|
||||
if (client.isOpen) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue