Dela via


Exkludera en URL

Om du vill undanta en URL från att fångas upp förbereder du den med ett ! (utropstecken):

{
  "$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
  "urlsToWatch": [
    "https://graph.microsoft.com/v1.0/*",
    "https://graph.microsoft.com/beta/*",
    "https://graph.microsoft.us/v1.0/*",
    "https://graph.microsoft.us/beta/*",
    "https://dod-graph.microsoft.us/v1.0/*",
    "https://dod-graph.microsoft.us/beta/*",
    "https://microsoftgraph.chinacloudapi.cn/v1.0/*",
    "https://microsoftgraph.chinacloudapi.cn/beta/*",
    "!https://*.sharepoint.*/*_api/web/GetClientSideComponents",
    "https://*.sharepoint.*/*_api/*",
    "https://*.sharepoint.*/*_vti_bin/*",
    "https://*.sharepoint-df.*/*_api/*",
    "https://*.sharepoint-df.*/*_vti_bin/*"
  ]
}

I exemplet ovan ignorerar proxyn alla begäranden som görs till /_api/web/GetClientSideComponents.

Tänk på att proxyn söker efter matchande URL:er i den ordning som de definieras i konfigurationen när du exkludera URL:er.

Om du vill exkludera specifika URL:er bör du definiera dem först innan fler globala URL:er matchar.