Quick Start
Enable strict security mode for production:Security Options
CORS Configuration
By default, FrontMCP uses permissive CORS (origin: true) for development convenience. In production, you should restrict origins explicitly:
Bind Address
Controls which network interface the server listens on:Strict Mode Behavior
Whensecurity.strict: true:
- Standalone mode: binds to
127.0.0.1(loopback only) - Distributed mode: binds to
0.0.0.0(pods need external access)
Explicit Override
DNS Rebinding Protection
Validates the HTTPHost and Origin headers against an allowlist. When a request arrives with an unrecognized host, the server responds with 403 Forbidden.
allowedHosts: Matches theHostheader exactly (include port if non-standard)allowedOrigins: Matches theOriginheader exactly (include scheme)- If
allowedOriginsis set, requests without anOriginheader are allowed through (non-browser clients)
DNS rebinding attacks use a malicious domain that resolves to
127.0.0.1, tricking a browser into making requests to your local server. Host validation blocks these requests.Security Audit Warnings
In production (NODE_ENV=production) or distributed mode, FrontMCP logs security warnings at startup:
Production Checklist
- Set explicit
cors.origin(nottrue) - Enable
security.dnsRebindingProtectionwithallowedHosts - Set
security.bindAddressto'loopback'if behind a reverse proxy - Configure TLS termination at the reverse proxy layer
- Set
NODE_ENV=productionfor security audit warnings - Review startup logs for
[Security]warnings
Example: Full Production Config
Related
Security Headers & CSP
Content Security Policy, HSTS, and X-Frame-Options
High Availability
Distributed sessions, heartbeat, and session takeover
Redis Setup
Redis connection and session store configuration
Production Build
Build and deploy for production