我正在构建一个扩展,并且仅在 azure devops 服务器上遇到了 workItemIcons api 端点的问题,它适用于 azure devops 服务。我要达到的终点是http://...../DefaultCollection/_apis/wit/workItemIcons
. 在本地运行扩展时出现以下错误,但即使在已发布版本上也会出现相同类型的错误。
Access to fetch at 'http://...../DefaultCollection/_apis/wit/workItemIcons' from origin 'http://localhost:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
我认为扩展范围很好
"vso.graph",
"vso.identity",
"vso.project",
"vso.profile",
"vso.work_full",
"vso.analytics",
"vso.work"
],```
We're using the `azure-devops-extension-api` package.