fix #114: add missing type def
parent
8a097698be
commit
57a37fd3c1
|
|
@ -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')
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue