MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / authLabel

Function authLabel

packages/app/src/web/server-connection-menu.tsx:155–161  ·  view source on GitHub ↗
(connection: ExecutorServerConnection)

Source from the content-addressed store, hash-verified

153};
154
155const authLabel = (connection: ExecutorServerConnection): string => {
156 const authorization = getExecutorServerAuthorizationHeader(connection);
157 if (!authorization) return "No auth";
158 if (authorization.startsWith("Bearer ")) return "Bearer";
159 if (authorization.startsWith("Basic ")) return "Basic";
160 return "Auth";
161};
162
163const isLoopbackHost = (host: string): boolean =>
164 host === "localhost" || host === "127.0.0.1" || host === "::1" || host === "[::1]";

Callers 1

ServerConnectionMenuFunction · 0.85

Tested by

no test coverage detected