This commit is contained in:
Shahrad Elahi
2023-12-11 05:13:05 +03:30
parent 4aa94a787c
commit 84284360a2
8 changed files with 48 additions and 48 deletions

View File

@@ -3,9 +3,7 @@ import { verifyToken } from '$lib/auth';
import 'dotenv/config';
export const handle: Handle = async ({ event, resolve }) => {
const { HASHED_PASSWORD } = process.env;
if (!!HASHED_PASSWORD && !AUTH_EXCEPTION.includes(event.url.pathname)) {
if (!AUTH_EXCEPTION.includes(event.url.pathname)) {
const token = event.cookies.get('authorization');
const token_valid = await verifyToken(token ?? '');