FE 142

[ CANVAS ] ERROR DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

크로스 오리진 속성 추가 https://stackoverflow.com/questions/22097747/how-to-fix-getimagedata-error-the-canvas-has-been-tainted-by-cross-origin-data How to fix getImageData() error The canvas has been tainted by cross-origin data? My code is working very well on my localhost but it is not working on the site. I got this error from the console, for this line .getImageData(x,y,1,1).data: Uncaught SecurityErr..

FE/Canvas HEON.D 2023.06.08

[ Next ] api 통신 시 cors에러 해결 방법

next.config.js 파일에 rewrites를 작성해서 우회 시킨다. 여기서 중요한 점은 rewrites설정 했으면 api보낼때 앞에 baseUrl을 붙이면 안된다. const nextConfig = { reactStrictMode: true, swcMinify: true, async rewrites() { return [ { source: '/api/:path*', destination: `${process.env.NEXT_PUBLIC_SERVER_URL}/:path*` }, ] }, } module.exports = nextConfig export const api = axios.create({ baseURL: `/api`, withCredentials: true, timeout: 600000 ..

FE/Next 라넌.B 2023.03.21