feat: add site password configuration support

This commit is contained in:
hamster1963 2025-01-30 00:35:49 +08:00
parent 5cd8d1d92e
commit c59b381a35

View File

@ -12,6 +12,8 @@ export interface ServerEnvConfig {
DefaultLocale: string
/** Force show all servers */
ForceShowAllServers: boolean
/** Site password */
SitePassword: string
}
/**
@ -121,6 +123,7 @@ export function getAllEnvConfig(): { server: ServerEnvConfig; client: ClientEnvC
NezhaAuth: getServerEnv("NezhaAuth"),
DefaultLocale: getServerEnv("DefaultLocale"),
ForceShowAllServers: parseBoolean(getServerEnv("ForceShowAllServers")),
SitePassword: getServerEnv("SitePassword"),
},
client: {
NezhaFetchInterval: parseNumber(getClientEnv("NezhaFetchInterval"), 5000),