fix: use Web Crypto API in middleware (Edge Runtime compat)
All checks were successful
Deploy / deploy (push) Successful in 2m34s
All checks were successful
Deploy / deploy (push) Successful in 2m34s
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { cookies } from 'next/headers'
|
||||
import * as crypto from 'crypto'
|
||||
|
||||
const SECRET = process.env.APP_SECRET || 'smart-home-default-secret-change-me'
|
||||
@@ -24,7 +23,7 @@ export async function POST(req: Request) {
|
||||
secure: true,
|
||||
sameSite: 'strict',
|
||||
path: '/',
|
||||
maxAge: 60 * 60 * 24 * 365, // 1 year — tablet stays logged in
|
||||
maxAge: 60 * 60 * 24 * 365,
|
||||
})
|
||||
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user