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_paths
Attribute●Since v0.14

match_paths

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

MatchPaths restricts a header injection or rewrite rule to requests whose path matches one of the patterns, so one host can use a different credential per route. The path excludes the query string. A pattern is an exact path (/v1/runs); a prefix, written as the prefix followed by a slash and * or **, which matches any path starting with that prefix (the prefix /v1 also matches /v10); a suffix, written as *, a slash, and then the ending, which matches any path that ends with that text (the ending runs also matches /v1/xruns); or * alone for every path. A wildcard in the middle of a path is not supported. An empty list matches every path. A request whose path is not canonical (a . or .. segment, an empty segment such as //, a backslash, or a percent-encoded slash, backslash, or dot) matches no pattern. Rules are evaluated in order and the first match wins. Rejected on aws, gcp, azure, and relay rules.