- Add src/utils/sensitive.ts: redactUrl/redactValue/redactForLog - Apply redaction to MCP config printing (mcp.tsx) - Apply redaction to hard-fail logging (log.ts) - Apply redaction to chrome native host debug log - Apply redaction to CLI error output (exit.ts) - RCS: default bind to 127.0.0.1 instead of 0.0.0.0 - RCS: CORS restricted to localhost + baseUrl whitelist - pipeTransport: default bind to 127.0.0.1 via PIPE_HOST env
17 lines
705 B
TypeScript
17 lines
705 B
TypeScript
export const config = {
|
|
version: process.env.RCS_VERSION || "0.1.0",
|
|
port: parseInt(process.env.RCS_PORT || "3000"),
|
|
host: process.env.RCS_HOST || "127.0.0.1",
|
|
apiKeys: (process.env.RCS_API_KEYS || "").split(",").filter(Boolean),
|
|
baseUrl: process.env.RCS_BASE_URL || "",
|
|
pollTimeout: parseInt(process.env.RCS_POLL_TIMEOUT || "8"),
|
|
heartbeatInterval: parseInt(process.env.RCS_HEARTBEAT_INTERVAL || "20"),
|
|
jwtExpiresIn: parseInt(process.env.RCS_JWT_EXPIRES_IN || "3600"),
|
|
disconnectTimeout: parseInt(process.env.RCS_DISCONNECT_TIMEOUT || "300"),
|
|
} as const;
|
|
|
|
export function getBaseUrl(): string {
|
|
if (config.baseUrl) return config.baseUrl;
|
|
return `http://localhost:${config.port}`;
|
|
}
|