fix(mcp): disable DNS rebinding protection for LAN HTTP transport #6
@@ -26,10 +26,16 @@ from __future__ import annotations
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from mcp.server.fastmcp import FastMCP
|
from mcp.server.fastmcp import FastMCP
|
||||||
|
from mcp.server.transport_security import TransportSecuritySettings
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
mcp = FastMCP("codex")
|
# DNS rebinding protection disabled: the server is guarded by Bearer token auth
|
||||||
|
# (mcp_server.py _TokenAuth middleware) and UFW firewall (trusted LAN IPs only).
|
||||||
|
mcp = FastMCP(
|
||||||
|
"codex",
|
||||||
|
transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user