Fixed CloudFlare server exception.
Ylian Saint-Hilaire committed
Dec 10, 2020 at 15:16 UTC
c1ea99126e0672270ad84a9e2af800e9e1f9cfda
1 file changed
+1
-1
meshcentral.js
+1
-1
@@ -1329,7 +1329,7 @@ function CreateMeshCentralServer(config, args) {
1329
if (obj.supportsProxyCertificatesRequest == true) { obj.updateProxyCertificates(true); }
1330
1331
// Load CloudFlare trusted proxies list if needed
1332
- if ((obj.config.settings.trustedproxy != null) && (obj.config.settings.trustedproxy.toLowerCase() == 'cloudflare')) {
1332
+ if ((obj.config.settings.trustedproxy != null) && (typeof obj.config.settings.trustedproxy == 'string') && (obj.config.settings.trustedproxy.toLowerCase() == 'cloudflare')) {
1333
delete obj.args.trustedproxy;
1334
delete obj.config.settings.trustedproxy;
1335
obj.certificateOperations.loadTextFile('https://www.cloudflare.com/ips-v4', null, function (url, data, tag) {