From 07d93105a85d39caea8749b00bed85e13a5ffeff Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Sun, 21 Mar 2021 16:27:59 +0100 Subject: [PATCH] Fix typo (guest => guess) --- pkg/options/auth.gen.go | 8 ++++---- pkg/options/helpers.go | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/options/auth.gen.go b/pkg/options/auth.gen.go index cac77852c..0bf28b117 100644 --- a/pkg/options/auth.gen.go +++ b/pkg/options/auth.gen.go @@ -44,13 +44,13 @@ func Auth() (o *AuthOpt) { o = &AuthOpt{ Secret: getSecretFromEnv("jwt secret"), Expiry: time.Hour * 24 * 30, - ExternalRedirectURL: guestBaseURL() + "/auth/external/{provider}/callback", + ExternalRedirectURL: guessBaseURL() + "/auth/external/{provider}/callback", ExternalCookieSecret: getSecretFromEnv("external cookie secret"), - BaseURL: guestBaseURL() + "/auth", + BaseURL: guessBaseURL() + "/auth", SessionCookieName: "session", SessionCookiePath: "/auth", - SessionCookieDomain: guestHostname(), - SessionCookieSecure: strings.HasPrefix(guestBaseURL(), "https://"), + SessionCookieDomain: guessHostname(), + SessionCookieSecure: strings.HasPrefix(guessBaseURL(), "https://"), SessionLifetime: 24 * time.Hour, SessionPermLifetime: 360 * 24 * time.Hour, GarbageCollectorInterval: 15 * time.Minute, diff --git a/pkg/options/helpers.go b/pkg/options/helpers.go index 8c0af6909..0aa8f6eae 100644 --- a/pkg/options/helpers.go +++ b/pkg/options/helpers.go @@ -61,7 +61,7 @@ func fill(opt interface{}) { } } -func guestHostname() string { +func guessHostname() string { // All env keys we'll check, first that has any value set, will be used as hostname candidates := []string{ os.Getenv("DOMAIN"), @@ -80,9 +80,9 @@ func guestHostname() string { return "local.cortezaproject.org" } -func guestBaseURL() string { +func guessBaseURL() string { var ( - host = guestHostname() + host = guessHostname() _, isSecure = os.LookupEnv("LETSENCRYPT_HOST") )