Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
async rewrites() {
return [
{
source: '/api/:path*', // 프론트엔드 요청 경로
destination: 'http://www.picknee.co.kr:8080/:path*', // 백엔드 API 경로
},
];
},
};

export default nextConfig;
export default nextConfig;
3 changes: 1 addition & 2 deletions src/lib/axios.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import axios from "axios"
import Cookies from 'js-cookie';

const API_V1_BASE = 'http://www.picknee.co.kr:8080/'
const API_V1_BASE = '/api/'

const axiosInstance = axios.create({
baseURL: API_V1_BASE,
headers: {
"Content-Type": "application/json",
Accept: 'application/json',
"Access-Control-Allow-Origin": API_V1_BASE,
},
withCredentials: true,
});
Expand Down
Loading