Skip to content

Commit

Permalink
correctly detect protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Jun 22, 2023
1 parent 64da9ea commit 179c08d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frameworks-nextjs/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async function getSession(headers: Headers, config: NextAuthConfig) {
const request = new Request(`${origin}/api/auth/session`, {
headers: { cookie: headers.get("cookie") ?? "" },
})
config.useSecureCookies ??= origin.protocol === "https"
config.useSecureCookies ??= origin.protocol === "https:"

// Since we are server-side, we don't need to filter out the session data
// See https://nextjs.authjs.dev/v5#authenticating-server-side
Expand Down

0 comments on commit 179c08d

Please sign in to comment.