就是请求 CDN 资源,会发生错误。
我的网站是:www.abc.com
请求: https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/js/plugin.js 之类的资源,网络中提示:CORS 错误,控制台提示:
Access to CSS stylesheet at 'https://cdn.jsdelivr.net/npm/luckysheet/dist/assets/iconfont/iconfont.css' from origin 'http://www.abc.com' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `local`.
查询网上都是在 nginx 层处理,如:
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'
已经在 www.abc.com 的 nginx 配置中进行如上设置,还是提示 CORS 设置?
请问如何正确的处理?