From e05f028c0a7fde724074863d16158c67441a52bf Mon Sep 17 00:00:00 2001 From: Jens L Date: Tue, 25 Apr 2023 15:24:31 +0300 Subject: [PATCH] web/admin: disable generated proxy config by default (#5372) Signed-off-by: Jens Langhammer --- web/src/admin/providers/proxy/ProxyProviderViewPage.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/src/admin/providers/proxy/ProxyProviderViewPage.ts b/web/src/admin/providers/proxy/ProxyProviderViewPage.ts index 76ef79026..707034cd0 100644 --- a/web/src/admin/providers/proxy/ProxyProviderViewPage.ts +++ b/web/src/admin/providers/proxy/ProxyProviderViewPage.ts @@ -16,10 +16,12 @@ import "@goauthentik/elements/CodeMirror"; import { PFColor } from "@goauthentik/elements/Label"; import "@goauthentik/elements/Markdown"; import "@goauthentik/elements/Markdown"; +import { Replacer } from "@goauthentik/elements/Markdown"; import "@goauthentik/elements/Tabs"; import "@goauthentik/elements/buttons/ModalButton"; import "@goauthentik/elements/buttons/SpinnerButton"; import "@goauthentik/elements/events/ObjectChangelog"; +import { getURLParam } from "@goauthentik/elements/router/RouteMatch"; import { t } from "@lingui/macro"; @@ -140,8 +142,13 @@ export class ProxyProviderViewPage extends AKElement { md: MDCaddyStandalone, }, ]; - const replacers = [ + const replacers: Replacer[] = [ (input: string): string => { + // The generated config is pretty unreliable currently so + // put it behind a flag + if (!getURLParam("generatedConfig", false)) { + return input; + } if (!this.provider) { return input; }