This commit is contained in:
Benjamin Toby 2024-07-13 12:19:48 +01:00
parent 779881ec6e
commit d9d0b5ccc8

View File

@ -5,8 +5,8 @@
* Imports * Imports
* ============================================================================== * ==============================================================================
*/ */
const http = require("http"); const http = require("node:http");
const https = require("https"); const https = require("node:https");
const path = require("path"); const path = require("path");
const fs = require("fs"); const fs = require("fs");
const localGet = require("../engine/query/get"); const localGet = require("../engine/query/get");
@ -113,11 +113,9 @@ async function get({ key, db, query, queryValues, tableName }) {
}, },
port: localHostPort || 443, port: localHostPort || 443,
hostname: localHost || "datasquirel.com", hostname: localHost || "datasquirel.com",
path: encodeURIComponent(path), path: encodeURI(path),
}; };
console.log("scheme =>", scheme);
(scheme?.match(/^http$/i) ? http : https) (scheme?.match(/^http$/i) ? http : https)
.request( .request(
requestObject, requestObject,