Home / Function/ doesProxyContextMatchUrl() — vite Function Reference

doesProxyContextMatchUrl() — vite Function Reference

Architecture documentation for the doesProxyContextMatchUrl() function in proxy.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  96889b1a_4e14_1c3f_dbfe_aa244646006f["doesProxyContextMatchUrl()"]
  d873c697_620e_ffca_0134_e9fecd784782["proxy.ts"]
  96889b1a_4e14_1c3f_dbfe_aa244646006f -->|defined in| d873c697_620e_ffca_0134_e9fecd784782
  65695310_3d20_5d70_c2ad_710df99d8481["proxyMiddleware()"]
  65695310_3d20_5d70_c2ad_710df99d8481 -->|calls| 96889b1a_4e14_1c3f_dbfe_aa244646006f
  style 96889b1a_4e14_1c3f_dbfe_aa244646006f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/server/middlewares/proxy.ts lines 231–236

function doesProxyContextMatchUrl(context: string, url: string): boolean {
  return (
    (context[0] === '^' && new RegExp(context).test(url)) ||
    url.startsWith(context)
  )
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does doesProxyContextMatchUrl() do?
doesProxyContextMatchUrl() is a function in the vite codebase, defined in packages/vite/src/node/server/middlewares/proxy.ts.
Where is doesProxyContextMatchUrl() defined?
doesProxyContextMatchUrl() is defined in packages/vite/src/node/server/middlewares/proxy.ts at line 231.
What calls doesProxyContextMatchUrl()?
doesProxyContextMatchUrl() is called by 1 function(s): proxyMiddleware.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free