跨域请求编写

 

报错

Access to fetch at 'https://www.ncbi.nlm.nih.gov/genome/gdv/browser/static/data/categories.json' from origin 'http://dev.yy2021cn.com' 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.

 

解决方案

 has been blocked by CORS policy: Response 解决 - 知乎 (zhihu.com)

posted @ 2023-07-13 14:23  gbc  阅读(5)  评论(0)    收藏  举报