case class HttpConfig(allowedDomains: Option[Seq[String]], blockedDomains: Seq[String], blockInternalIPs: Boolean, maxResponseSize: Long, timeoutMs: Int, followRedirects: Boolean, maxRedirects: Int, allowedMethods: Seq[String], userAgent: String)
Configuration for HTTP tool.
== Security == By default, HTTPTool is configured with safe defaults:
Only GET and HEAD methods are allowed (read-only)
Internal IP ranges are blocked (10.x, 172.16-31.x, 192.168.x)
Cloud metadata endpoints are blocked (169.254.169.254)
Localhost and loopback addresses are blocked
Value parameters
allowedDomains
Optional list of allowed domains. If None, all domains are allowed.
allowedMethods
HTTP methods that are allowed (default: GET, HEAD for safety).
blockInternalIPs
Whether to block requests to internal/private IP ranges (default: true).
blockedDomains
List of domains that are always blocked.
followRedirects
Whether to follow HTTP redirects. Defaults to false; when true each redirect hop is re-validated against the SSRF filter before the next request is issued (open-redirect bypass prevention).
Check if a domain is allowed based on blocklist/allowlist configuration.
Check if a domain is allowed based on blocklist/allowlist configuration.
This method performs hostname-based checks only:
Hostname-based blocklist check
Allowlist check (if configured)
Note: IP-based SSRF protection (DNS resolution + IP range validation) is performed at request time by the HTTP tool to avoid expensive DNS lookups during validation.
WARNING: This enables potentially destructive methods (POST, PUT, DELETE). Only use this when you trust the LLM's judgment and have appropriate safeguards.
Each redirect hop is re-validated against the SSRF filter, sensitive headers (Authorization, Cookie) are stripped on cross-origin hops, and 301/302 redirects convert POST to GET per the HTTP specification.