它给了我以下错误: (index):1 Access to fetch at 'api link here ' from origin 'origin here' has been blocked by CORSIf an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource withCORS disabled.我修复了这个问题,在Googl
godaddy托管web api http://impexmail.co/api/Departments/Getdepartments使用jquery响应来自邮递员和超文本标记语言的get和post请求,但不响应Blazor使用相同的blazor wasm方法,我可以到达,例如https://jsonplaceholder.typicode.com/todos.。如有任何建议,欢迎光临。
我目前正在构建一个Blazor WebAssembly应用程序,它显示来自我的ASP.NET Core6API的数据。注意,这些项目是在两个不同的解决方案中分开的。显然,这与我的API的CORS配置有关。If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource withCORS disabled.该API的CORS配置基于 by 。