Skip to content

Commit

Permalink
fix: try fix netlify auth login
Browse files Browse the repository at this point in the history
  • Loading branch information
KeJunMao committed Mar 15, 2023
1 parent ef3e098 commit a0962a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server/api/auth/[...].ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ const nuxtAuthHandler = NuxtAuthHandler({
});
export default defineEventHandler(async (event) => {
const result = await nuxtAuthHandler(event);
const setCookie = event.node.res.getHeader("set-cookie")
console.log('start---------')
console.log(setCookie);
console.log('end---------')
const headerCookies = event.node.res.getHeader("set-cookie");
if (headerCookies && typeof headerCookies === "string") {
event.node.res.removeHeader("set-cookie");
event.node.res.setHeader("set-cookie", headerCookies.split(/,(?!\s)/));
}
return result;
});

1 comment on commit a0962a0

@vercel
Copy link

@vercel vercel bot commented on a0962a0 Mar 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ai-anything – ./

ai-anything.vercel.app
ai-anything-git-main-kejun.vercel.app
ai-anything-kejun.vercel.app

Please sign in to comment.