Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2025-12-03 09:49:22 -05:00
3 changed files with 18 additions and 4 deletions

View File

@@ -77,10 +77,12 @@ module.exports = function (utils, Benchpress, relative_path) {
}
function buildLinkTag(tag) {
const attributes = ['link', 'rel', 'as', 'type', 'href', 'sizes', 'title', 'crossorigin'];
const [link, rel, as, type, href, sizes, title, crossorigin] = attributes.map(attr => (tag[attr] ? `${attr}="${tag[attr]}" ` : ''));
const attributes = [
'link', 'rel', 'as', 'type', 'href', 'hreflang', 'sizes', 'title', 'crossorigin'
];
const [link, rel, as, type, href, hreflang, sizes, title, crossorigin] = attributes.map(attr => (tag[attr] ? `${attr}="${tag[attr]}" ` : ''));
return '<link ' + link + rel + as + type + sizes + title + href + crossorigin + '/>\n\t';
return '<link ' + link + rel + as + type + sizes + title + href + hreflang + crossorigin + '/>\n\t';
}
function stringify(obj) {

View File

@@ -1,5 +1,6 @@
'use strict';
const fs = require('fs');
const nconf = require('nconf');
const winston = require('winston');
const _ = require('lodash');
@@ -32,6 +33,18 @@ connection.getConnectionOptions = function (postgres) {
connectionTimeoutMillis: 90000,
};
if (typeof postgres.ssl === 'object' && !Array.isArray(postgres.ssl) && postgres.ssl !== null) {
const { ssl } = postgres;
connOptions.ssl = {
rejectUnauthorized: ssl.rejectUnauthorized,
};
['ca', 'key', 'cert'].forEach((prop) => {
if (ssl.hasOwnProperty(prop)) {
connOptions.ssl[prop] = fs.readFileSync(ssl[prop]).toString();
}
});
}
return _.merge(connOptions, postgres.options || {});
};

View File

@@ -22,7 +22,6 @@ connection.connect = async function (options) {
const sentinelRootNodes = options.sentinels.map(sentinel => ({ host: sentinel.host, port: sentinel.port }));
cxn = createSentinel({
...options.options,
name: 'sentinel-db',
sentinelRootNodes,
});
} else if (redis_socket_or_host && String(redis_socket_or_host).indexOf('/') >= 0) {