From a15571bd3ed10b8c82301c0298bbc7b18bf517f3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 1 Sep 2021 22:09:07 +0200 Subject: [PATCH] outposts/proxy: detect empty authentik_host Signed-off-by: Jens Langhammer --- README.md | 2 +- internal/outpost/proxy/api_bundle.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 846441ddb..cf97b5b72 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ![Docker pulls](https://img.shields.io/docker/pulls/beryju/authentik.svg?style=for-the-badge) ![Latest version](https://img.shields.io/docker/v/beryju/authentik?sort=semver&style=for-the-badge) ![LGTM Grade](https://img.shields.io/lgtm/grade/python/github/goauthentik/authentik?style=for-the-badge) -[Transifex](https://www.transifex.com/beryjuorg/authentik/) +[![](https://img.shields.io/badge/Help%20translate-transifex-blue?style=for-the-badge)](https://www.transifex.com/beryjuorg/authentik/) ## What is authentik? diff --git a/internal/outpost/proxy/api_bundle.go b/internal/outpost/proxy/api_bundle.go index 3079fff74..61c1447c4 100644 --- a/internal/outpost/proxy/api_bundle.go +++ b/internal/outpost/proxy/api_bundle.go @@ -39,8 +39,8 @@ func intToPointer(i int) *int { func (pb *providerBundle) replaceLocal(url string) string { if strings.HasPrefix(url, "http://localhost:8000") { authentikHost, c := pb.s.ak.Outpost.Config["authentik_host"] - if !c { - pb.log.Warning("Outpost has localhost API Connection but no authentik_host is configured.") + if !c || authentikHost == "" { + pb.log.Warning("Outpost has localhost/blank API Connection but no authentik_host is configured.") return url } f := strings.ReplaceAll(url, "http://localhost:8000", authentikHost.(string))