若要排除被截获的 URL,请在前面加上一个 !
(感叹号):
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.27.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/*"
]
}
在上述示例中,代理会忽略对/_api/web/GetClientSideComponents
的任何请求。
排除 URL 时,请记住,代理按配置中定义 URL 的顺序查找匹配的 URL。
如果要排除特定 URL,则应先定义它们,然后再进行更多全局 URL 匹配。