Files
ARTEX-chixuweihu/server
ji ruo 0a0158a4ab feat(mcp): add a source allowlist for the MCP server endpoint
Restrict which source addresses may call /mcp with a list of IPs/CIDRs
(IPv4 and IPv6). The check runs before token authentication, so a source
that is not listed is refused with 403 even when it holds a valid token.
An empty list keeps the previous behaviour (any source).

Behind a reverse proxy the TCP peer is always the proxy, so proxies can be
registered as trusted: for requests from them the client is the rightmost
X-Forwarded-For hop that is not itself a trusted proxy. Without a trusted
proxy the header is ignored, so a caller cannot claim an allowed address.

- A stored configuration that cannot be read or parsed refuses requests
  instead of falling back to no restriction.
- The audit log records the resolved client address.
- The settings API reports the address the server sees for the caller.
- The allowlist applies to /mcp only; the web UI and admin API are
  unaffected.

Refs RuoJi6/ARTEX#144
2026-11-14 14:32:39 +08:00
..
2026-10-07 07:45:28 -04:00
2026-07-26 04:27:45 -04:00
2026-08-24 14:14:15 +08:00
2026-08-24 14:14:15 +08:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-08-24 14:14:15 +08:00
2026-10-09 23:05:44 +08:00
2026-08-24 14:14:15 +08:00
2026-08-28 12:56:29 +08:00
2026-08-24 14:14:15 +08:00
2026-07-26 04:27:45 -04:00
2026-08-25 12:05:26 +08:00
2026-08-25 12:05:26 +08:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00