소개
게시글
질문&답변
2020.10.26
외부 api 연동 cross origin 에러
아주 잘됩니다 빠른답변 감동입니다 정말 감사합니다!!ㅎㅎ
- 0
- 7
- 1.6K
질문&답변
2020.10.26
외부 api 연동 cross origin 에러
머가 다른 셋팅을 추가적으로 해줘야하나요? 여러 방법으로 시도중인데 안되서 주석처리하고 따로 빼줘도 안되네요 미들웨어 추가도 안되고 죄송하지만 한번더 문의드립니다.ㅜㅜ const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true', }); /* module.exports = withBundleAnalyzer({ compress: true, webpack(config, { webpack }) { const prod = process.env.NODE_ENV === 'production'; return { ...config, mode: prod ? 'production' : 'development', devtool: prod ? 'hidden-source-map' : 'eval', plugins: [ ...config.plugins, new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /^\.\/ko$/), ], }; }, });*/ module.exports = { async rewrites() { return [ // we need to define a no-op rewrite to trigger checking // all pages/static files before we attempt proxying { source: '/:path*', destination: '/:path*', }, { source: '/:path*', destination: `http://api-stage.test.com:1313/:path*`, }, ] }, }
- 0
- 7
- 1.6K
질문&답변
2020.10.25
외부 api 연동 cross origin 에러
답변 감사합니다. 제가 프록시 서버를 개념을 착각하고 있네요 이제 해결 가능할 것 같습니다 다시한번 감사합니다.
- 0
- 7
- 1.6K
질문&답변
2020.10.25
외부 api 연동 cross origin 에러
api 서버에 localhost 등록이 된상태입니다. 2년전에 배운 react redux-thunk 베이스(프록시 서버X)에서 테스트 시 이상이 없었습니다. 이런 상황이면 어떤 부분을 의심해봐야할까요? 기초가 부족해서 그런지 찾아볼려고해도 감이 안잡혀서 난감한 상황입니다ㅜㅜ
- 0
- 7
- 1.6K