Fix warning on success

This commit is contained in:
Jonathan de Jong 2022-09-27 11:51:00 +02:00 committed by GitHub
parent 5fe6538c02
commit 70ecda6fd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
app.go
View File

@ -194,12 +194,14 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
if cfg.OIDC.Issuer != "" {
err = app.initOIDC()
if err != nil && cfg.OIDC.OnlyStartIfOIDCIsAvailable {
if err != nil {
if cfg.OIDC.OnlyStartIfOIDCIsAvailable {
return nil, err
} else {
log.Warn().Err(err).Msg("failed to set up OIDC provider, falling back to CLI based authentication")
}
}
}
if app.cfg.DNSConfig != nil && app.cfg.DNSConfig.Proxied { // if MagicDNS
magicDNSDomains := generateMagicDNSRootDomains(app.cfg.IPPrefixes)