Skip to content

Commit c6aae8f

Browse files
committed
Revert "refactor: improve secure cookie handling in getAuthSession function"
This reverts commit 00b6e2d.
1 parent 00b6e2d commit c6aae8f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/server/model/auth.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,8 @@ export const authConfig: Omit<AuthConfig, 'raw'> = {
144144
*/
145145
export async function getAuthSession(
146146
req: IncomingMessage,
147-
_secure = false
147+
secure = false
148148
): Promise<Session | null> {
149-
const cookieStr = req.headers.cookie ?? '';
150-
151-
// Not cool
152-
const secure = cookieStr.includes('__Secure-authjs.session-token')
153-
? true
154-
: false;
155149
const protocol = secure ? 'https:' : 'http:';
156150
const url = createActionURL(
157151
'session',

0 commit comments

Comments
 (0)