From 60e911baf838a2ec876aa829b3c47b6fbbb36443 Mon Sep 17 00:00:00 2001 From: Jens L Date: Fri, 26 May 2023 17:46:01 +0200 Subject: [PATCH] website: fix go-get function (always fallback to authentik repo except hardcoded values) (#5767) Signed-off-by: Jens Langhammer --- website/netlify/functions/go-get.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/netlify/functions/go-get.js b/website/netlify/functions/go-get.js index 4f8a49bcc..c18ee3974 100644 --- a/website/netlify/functions/go-get.js +++ b/website/netlify/functions/go-get.js @@ -2,18 +2,18 @@ const gitHubNamespace = "goauthentik"; exports.handler = async function (event, context) { let repo = ""; - if (event.path === "/") { - repo = "/authentik"; - } else if (event.path.startsWith("/api")) { - repo = "/client-go"; + if (event.path.startsWith("/api")) { + repo = "client-go"; + } else if (event.path.startsWith("/terraform-provider-authentik")) { + repo = "terraform-provider-authentik"; } else { - repo = event.path; + repo = "authentik"; } return { statusCode: 200, headers: { "content-type": "text/html", }, - body: ``, + body: ``, }; };