SECURITY: fix private config file leak

This commit is contained in:
lyc8503 committed 2026-03-04 21:39:34 +08:00
1 parent ef8ab25f44
commit 377a5963c6
4 files changed
+52 -9

No files matched your search

+2 -1
View File
@@ -2,7 +2,7 @@ import Head from 'next/head'
import { Inter } from 'next/font/google'
import { MonitorTarget } from '@/types/config'
import { maintenances, pageConfig, workerConfig } from '@/uptime.config'
import { maintenances, pageConfig } from '@/uptime.config'
import OverallStatus from '@/components/OverallStatus'
import Header from '@/components/Header'
import MonitorList from '@/components/MonitorList'
@@ -69,6 +69,7 @@ export default function Home({
}
export async function getServerSideProps() {
const { workerConfig } = await import('@/uptime.config')
// Read state as string from storage, to avoid hitting server-side cpu time limit
const compactedStateStr = await getFromStore(process.env as any, 'state')