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, IPv6 unique-local fc00::/7, ...)
- 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. A leading
www.is ignored. - 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. A leading
www.is ignored. - followRedirects
-
Whether to follow HTTP redirects. Defaults to
false; whentrueeach redirect hop is re-validated against the SSRF filter before the next request is issued (open-redirect bypass prevention). - maxRedirects
-
Maximum number of redirects to follow.
- maxResponseSize
-
Maximum number of response body bytes read; the rest is never read, and the result's
truncatedistrue. - redirectSafeHeaders
-
The caller-set headers a redirect may carry to another origin (matched in any case). Once a hop leaves the original request's origin - its scheme, host and port, so a downgrade from
httpstohttpcounts - every other header the caller set is dropped, on that hop and every later one, including one that comes back. The default isAccept,Accept-Language,Accept-Encoding,User-AgentandContent-Type, the last only on a hop that re-sends the body (a 307 or 308). A header that names a credential (Authorization,Cookie,Proxy-Authorization, any name core's redaction treats as sensitive, such asX-Api-KeyorX-Client-Secret, and any name ending intokenorkey) is dropped even if listed here.Seq.emptyforwards no caller-set header. - timeout
-
Deadline for the whole call: connecting, every redirect hop and reading the body must all finish within it (the SSRF check's name resolution too), so a server that sends slowly cannot hold the call longer. A call that runs out of time fails with a
TIMEOUT:error. A zero or negative timeout fails every call; one beyond 100 years is treated as 100 years. ATIMEOUT:releases the caller, not the request: one already sent may still be delivered and acted on by the server (a write is not rolled back), and a DNS lookup cannot be interrupted, so the worker thread may outlive the deadline by up to the resolver's own timeout (#1734). - userAgent
-
User-Agent header to use.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any