mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-12 16:06:38 +00:00
disable local and wg sites with flag
This commit is contained in:
@@ -138,17 +138,17 @@ export default function Page() {
|
||||
description: t('siteNewtTunnelDescription'),
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
id: "wireguard",
|
||||
...(env.flags.disableBasicWireguardSites ? [] : [{
|
||||
id: "wireguard" as SiteType,
|
||||
title: t('siteWg'),
|
||||
description: t('siteWgDescription'),
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
id: "local",
|
||||
}]),
|
||||
...(env.flags.disableLocalSites ? [] : [{
|
||||
id: "local" as SiteType,
|
||||
title: t('local'),
|
||||
description: t('siteLocalDescription')
|
||||
}
|
||||
}])
|
||||
]);
|
||||
|
||||
const [loadingPage, setLoadingPage] = useState(true);
|
||||
|
||||
@@ -38,6 +38,12 @@ export function pullEnv(): Env {
|
||||
process.env.FLAGS_ALLOW_RAW_RESOURCES === "true" ? true : false,
|
||||
allowBaseDomainResources:
|
||||
process.env.FLAGS_ALLOW_BASE_DOMAIN_RESOURCES === "true"
|
||||
? true
|
||||
: false,
|
||||
disableLocalSites:
|
||||
process.env.FLAGS_DISABLE_LOCAL_SITES === "true" ? true : false,
|
||||
disableBasicWireguardSites:
|
||||
process.env.FLAGS_DISABLE_BASIC_WIREGUARD_SITES === "true"
|
||||
? true
|
||||
: false
|
||||
}
|
||||
|
||||
@@ -22,5 +22,7 @@ export type Env = {
|
||||
emailVerificationRequired: boolean;
|
||||
allowRawResources: boolean;
|
||||
allowBaseDomainResources: boolean;
|
||||
disableLocalSites: boolean;
|
||||
disableBasicWireguardSites: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user