[Error] Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin. Status code: 200
[Error] Cannot load image http://어쩌구저쩌구.png due to access control checks.
[Error] Failed to load resource: Origin http://localhost:3000 is not allowed by Access-Control-Allow-Origin. Status code: 200 (사진이미지.png, line 0)
온리 safari에서만 ezr
해결 : http://어쩌구저쩌구.png
👉 http://어쩌구저쩌구.png/
로 바꾼다
https://stackoverflow.com/questions/16824661/cors-request-not-working-in-safari
응또안됨
It's because iOS has some bizarre caching issue with CORS enabled images. So if you load an image with [imagePreloader.crossOrigin = "Anonymous"] and that image was already cached, then the loading will fail.
const image = new Image();
image.crossOrigin = 'Anonymous'
를 지우면
이런 에러가 뜨면서 캔버스에 안올라감
Unhandled Promise Rejection: SecurityError: The operation is insecure.
아무튼 관련 정책있는데 그건 알아서들 찾아보시고
https://stackoverflow.com/questions/48350432/cors-on-canvas-not-working-on-chrome-and-safari#comment115230526_48669554
https://stackoverflow.com/questions/12648809/cors-policy-on-cached-image
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
ios에서 캐싱된 이미지를 다시 불러오려고 할때 cors 에러를 냄
그래서 img src를 그대로 안박아넣고 timestamp 넣어서 캐싱된 이미지 무시까도록 했더니 됨 개킹받아진짜