Access to image at ‘http://127.0.0.1:3000/api/getImg?url=/uploads/file/20240421/file-1713715007811-logo.png’ from origin ‘http://ggbol.gnway.cc’ has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space local.
报错导致图片加载不出来
解决办法:
- 地址栏输入对应地址
谷歌:chrome://flags/
edge:edge://flags/
- 搜索以下关键词
Block insecure private network requests
- 查询后,修改为“Disabled”,并Relaunch重新启动下,点击后会自动重启浏览器重启后,就解决了此跨域问题。