MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / refusePublicBind

Function refusePublicBind

packages/server/src/start.ts:233–241  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

231 const bindClass = classify(opts.host, { bindClass: opts.bindClass });
232 if (bindClass !== 'loopback') {
233 const refusePublicBind = async (message: string): Promise<never> => {
234 try {
235 await tokenStore.dispose();
236 } catch {
237 // best-effort cleanup of the token file on boot refusal
238 }
239 lockHandle.release();
240 throw new Error(message);
241 };
242 if (opts.insecureNoTls !== true) {
243 await refusePublicBind(
244 'Refusing to bind a non-loopback host without TLS. ' +

Callers 1

startServerFunction · 0.85

Calls 2

disposeMethod · 0.65
releaseMethod · 0.65

Tested by

no test coverage detected