MCPcopy Index your code
hub / github.com/Waishnav/devspace / requestLogFields

Function requestLogFields

src/server.ts:264–273  ·  view source on GitHub ↗
(req: Request, config: ServerConfig)

Source from the content-addressed store, hash-verified

262}
263
264function requestLogFields(req: Request, config: ServerConfig): Record<string, unknown> {
265 return {
266 ip: requestIp(req, config.logging.trustProxy),
267 host: req.header("host"),
268 userAgent: req.header("user-agent"),
269 origin: req.header("origin"),
270 referer: req.header("referer"),
271 contentLength: req.header("content-length"),
272 };
273}
274
275function logToolCall(config: ServerConfig, fields: ToolLogFields): void {
276 if (!config.logging.toolCalls) return;

Callers 1

createServerFunction · 0.85

Calls 1

requestIpFunction · 0.85

Tested by

no test coverage detected