The pictures on the server can be displayed and download, but canvas draw error reports across domains?

There are multiple pictures on the

page, and the path is similar to https://image-1257049018.cos.png, which can be displayed and downloaded normally. However, when drawing this picture (remote address) with canvas, it was mistakenly said that the cross-domain
code is as follows

.

clipboard.png

clipboard.png

,response header

clipboard.png

Apr.01,2021

try adding the following line before setting img.src

img.crossOrigin = "Anonymous";

if not, please post your source code

Menu