diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2021-08-03 19:55:21 +1000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-03 19:55:21 +1000 | 
| commit | a7e867a699a77f0b9d564defd81094fd410e4404 (patch) | |
| tree | 27f034afeac853157d7a7e2bc99407740720fcec /internal/server/server.go | |
| parent | 3d656eb5db67a949fca6d4fe20873b107ffcb28e (diff) | |
feat(configuration): replace viper with koanf (#2053)
This commit replaces github.com/spf13/viper with github.com/knadh/koanf. Koanf is very similar library to viper, with less dependencies and several quality of life differences. This also allows most config options to be defined by ENV. Lastly it also enables the use of split configuration files which can be configured by setting the --config flag multiple times.
Co-authored-by: Amir Zarrinkafsh <nightah@me.com>
Diffstat (limited to 'internal/server/server.go')
| -rw-r--r-- | internal/server/server.go | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index 7cad36644..ef5c2f6ce 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -153,8 +153,8 @@ func registerRoutes(configuration schema.Configuration, providers middlewares.Pr  	return handler  } -// StartServer start Authelia server with the given configuration and providers. -func StartServer(configuration schema.Configuration, providers middlewares.Providers) { +// Start Authelia's internal webserver with the given configuration and providers. +func Start(configuration schema.Configuration, providers middlewares.Providers) {  	logger := logging.Logger()  	handler := registerRoutes(configuration, providers) @@ -192,10 +192,10 @@ func StartServer(configuration schema.Configuration, providers middlewares.Provi  	}  	if configuration.Server.TLS.Certificate != "" && configuration.Server.TLS.Key != "" { -		logger.Infof("Authelia is listening for TLS connections on %s%s", addrPattern, configuration.Server.Path) +		logger.Infof("Listening for TLS connections on %s%s", addrPattern, configuration.Server.Path)  		logger.Fatal(server.ServeTLS(listener, configuration.Server.TLS.Certificate, configuration.Server.TLS.Key))  	} else { -		logger.Infof("Authelia is listening for non-TLS connections on %s%s", addrPattern, configuration.Server.Path) +		logger.Infof("Listening for non-TLS connections on %s%s", addrPattern, configuration.Server.Path)  		logger.Fatal(server.Serve(listener))  	}  }  | 
