Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- mosquitto.conf
- listener 1883
- pm2
- tailwind
- map이 undefined가 뜰 때
- setInterval 외부 정지
- mySQL_Replication
- pm2 설치
- html #select #option #multiple
- setInterval clear
- invalid data
- pm2 확인
- pm2 상태 확인
- datagridview 직접입력
- react
- 서버동기화
- DataGridView 직접 입력
- setInterval 정지
- c# datagridview 데이터 넣기
- AntDesign
- timepicker
- pm2 시작
- 맥 어드레스
- 데이터테이블 데이터 넣기
- DatePicker
- setInterval 중지
- 1883
- mosquitto
- allow_anonymouse
- vite
Archives
- Today
- Total
개발 노트
next.js kakao map api 사용 중 cross origin error 본문
// next.config.js
const nextConfig = {
reactStrictMode: true,
async headers() {
return [
{
// matching all API routes
source: "/api/:path*",
headers: [
{ key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Origin", value: "*" },
{
key: "Access-Control-Allow-Methods",
value: "GET,OPTIONS,PATCH,DELETE,POST,PUT",
},
{
key: "Access-Control-Allow-Headers",
value:
"X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version",
},
],
},
];
},
webpack(config, options) {
config.module.rules.push({
test: /\.svg$/,
issuer: { and: [/\.(js|ts)x?$/] },
use: ["@svgr/webpack"],
});
return config;
},
};
module.exports = nextConfig;
[kakao map] vercel로 배포하였을때 발생하는 CORS 오류 해결하는 법
local에서 개발할때는 kakao map 지도가 잘 보였는데vercel에서 배포를 하니까 이렇게 뜨면서 지도가 전혀 뜨지 않는 오류가 발생했었다.이전에도 지금 상황처럼 똑같이 next.js로 개발하고 kakao map 지
velog.io
'React' 카테고리의 다른 글
next.js 언어모듈 참고 (0) | 2024.01.18 |
---|---|
npm Cannot read properties of undefined (reading 'stdin') error (0) | 2024.01.17 |
kakaomap 연동하기 (0) | 2024.01.15 |
NextAuth로 구글로그인 구현하기 (0) | 2024.01.09 |
Next.js app router 기본 (0) | 2024.01.04 |