Skip to content

Commit

Permalink
Fix : CORS 헤더 추가 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
jobkaeHenry authored Nov 27, 2023
1 parent e3375cf commit 190f5a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/app/api/auth/login/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export async function POST(request: NextRequest) {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "Content-Type, Authorization",
"Access-Control-Allow-Credentials": "true",
},
}
);
Expand All @@ -41,6 +42,7 @@ export async function POST(request: NextRequest) {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "Content-Type, Authorization",
"Access-Control-Allow-Credentials": "true",
},
}
);
Expand Down
4 changes: 4 additions & 0 deletions client/src/hooks/useLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default function useLogin() {
{
id,
password,
},
{
baseURL: process.env.NEXT_PUBLIC_CLIENT_BASE_URL,
withCredentials: true,
}
);
return data;
Expand Down

0 comments on commit 190f5a1

Please sign in to comment.