LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithtypesproxy_configRulematch_hosts
Attribute●Since v0.14

match_hosts

Copy
match_hosts: Optional[List[str]] = None
View source on GitHub

MatchHosts lists the hosts a header injection, rewrite, or relay rule covers.

AWS and GCP rules match their provider's hosts built in; there MatchHosts optionally narrows them to the listed hosts (e.g. "sts.amazonaws.com", "bigquery.googleapis.com"), and when empty the rule covers every host the provider can authenticate. A host no rule covers is passed through without TLS interception. Azure rules do not accept it. A relay rule may also list IP addresses and CIDR blocks (10.0.0.0/8), which match connections the sandbox makes to an IP address rather than a name.