From 57a37fd3c1664ed24d87718127b41071d35f4611 Mon Sep 17 00:00:00 2001 From: lyc8503 Date: Sat, 31 May 2025 01:20:32 +0800 Subject: [PATCH] fix #114: add missing type def --- middleware.ts | 1 - types/config.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware.ts b/middleware.ts index 3568f08..b6fa2fe 100644 --- a/middleware.ts +++ b/middleware.ts @@ -3,7 +3,6 @@ import type { NextRequest } from 'next/server' import { workerConfig } from './uptime.config' export async function middleware(request: NextRequest) { - // @ts-ignore const passwordProtection = workerConfig.passwordProtection if (passwordProtection) { const authHeader = request.headers.get('Authorization') diff --git a/types/config.ts b/types/config.ts index a18be28..69afa29 100644 --- a/types/config.ts +++ b/types/config.ts @@ -41,6 +41,7 @@ export type MonitorTarget = { export type WorkerConfig = { kvWriteCooldownMinutes: number + passwordProtection?: string monitors: MonitorTarget[] notification?: Notification callbacks?: Callbacks