MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / isSecureEndpoint

Method isSecureEndpoint

out/cli.cjs:25981–25994  ·  view source on GitHub ↗

* Determine whether this is an `http` or `https` request.

(options)

Source from the content-addressed store, hash-verified

25979 * Determine whether this is an `http` or `https` request.
25980 */
25981 isSecureEndpoint(options) {
25982 if (options) {
25983 if (typeof options.secureEndpoint === "boolean") {
25984 return options.secureEndpoint;
25985 }
25986 if (typeof options.protocol === "string") {
25987 return options.protocol === "https:";
25988 }
25989 }
25990 const { stack } = new Error();
25991 if (typeof stack !== "string")
25992 return false;
25993 return stack.split("\n").some((l3) => l3.indexOf("(https.js:") !== -1 || l3.indexOf("node:https:") !== -1);
25994 }
25995 // In order to support async signatures in `connect()` and Node's native
25996 // connection pooling in `http.Agent`, the array of sockets for each origin
25997 // has to be updated synchronously. This is so the length of the array is

Callers 3

getNameMethod · 0.80
createSocketMethod · 0.80
protocolMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected