我正在尝试访问我的电影 API,该 API 通过 React 应用程序返回包括电影海报图像的数据。该图像是从外部网站请求的。每次我向端点发出请求时\\movies,图像都会被阻止,并且我会在控制台中收到以下消息
net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200
在“网络”选项卡中查看请求时,我收到以下消息,表示启用跨源资源策略
\nBecause your site has the Cross-Origin Embedder Policy (COEP) enabled, each resource must specify a suitable Cross-Origin Resource Policy (CORP). This behavior prevents a document from loading cross-origin resources which don\xe2\x80\x99t explicitly grant permission to be loaded.\nTo solve this, add the following to the resource\xe2\x80\x99s response header:\nCross-Origin-Resource-Policy: same-site if the resource and your site are served from the same site.\nCross-Origin-Resource-Policy: cross-origin if the resource is served …Run Code Online (Sandbox Code Playgroud) node.js cors express cross-origin-embedder-policy cross-origin-resource-policy