fix #114: add missing type def

pull/120/head
lyc8503 2025-05-31 01:20:32 +08:00
parent 8a097698be
commit 57a37fd3c1
2 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,6 @@ import type { NextRequest } from 'next/server'
import { workerConfig } from './uptime.config' import { workerConfig } from './uptime.config'
export async function middleware(request: NextRequest) { export async function middleware(request: NextRequest) {
// @ts-ignore
const passwordProtection = workerConfig.passwordProtection const passwordProtection = workerConfig.passwordProtection
if (passwordProtection) { if (passwordProtection) {
const authHeader = request.headers.get('Authorization') const authHeader = request.headers.get('Authorization')

View File

@ -41,6 +41,7 @@ export type MonitorTarget = {
export type WorkerConfig = { export type WorkerConfig = {
kvWriteCooldownMinutes: number kvWriteCooldownMinutes: number
passwordProtection?: string
monitors: MonitorTarget[] monitors: MonitorTarget[]
notification?: Notification notification?: Notification
callbacks?: Callbacks callbacks?: Callbacks