Fix typo (guest => guess)
This commit is contained in:
parent
1c3e3078b2
commit
07d93105a8
@ -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,
|
||||
|
||||
@ -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")
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user