outposts/proxy: fix securecookie: no codecs provided error with redis

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-09-09 10:23:46 +02:00
parent eb2540a3c8
commit 4c3a9e69f2
5 changed files with 20 additions and 8 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"net/url"
"os"
"strconv"
log "github.com/sirupsen/logrus"
@ -20,7 +21,8 @@ Required environment variables:
- AUTHENTIK_INSECURE: Skip SSL Certificate verification
Optionally, you can set these:
- AUTHENTIK_HOST_BROWSER: URL to use in the browser, when it differs from AUTHENTIK_HOST`
- AUTHENTIK_HOST_BROWSER: URL to use in the browser, when it differs from AUTHENTIK_HOST
- AUTHENTIK_PORT_OFFSET: Offset to add to the listening ports, i.e. value of 100 makes proxy listen on 9100`
func main() {
log.SetLevel(log.DebugLevel)
@ -36,6 +38,15 @@ func main() {
fmt.Println(helpMessage)
os.Exit(1)
}
portOffset := 0
portOffsetS := os.Getenv("AUTHENTIK_PORT_OFFSET")
if portOffsetS != "" {
v, err := strconv.Atoi(portOffsetS)
if err != nil {
fmt.Println(err.Error())
}
portOffset = v
}
akURLActual, err := url.Parse(akURL)
if err != nil {
@ -49,7 +60,7 @@ func main() {
ac := ak.NewAPIController(*akURLActual, akToken)
ac.Server = proxyv2.NewProxyServer(ac)
ac.Server = proxyv2.NewProxyServer(ac, portOffset)
err = ac.Start()
if err != nil {