From 6b1482daee03482c90ac91392efbcc0a68f4b97b Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 31 May 2022 12:50:43 +0200 Subject: [PATCH] Use config object instead of viper for policy path --- cmd/headscale/cli/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/headscale/cli/utils.go b/cmd/headscale/cli/utils.go index 2c0eb0a4..154b5ac1 100644 --- a/cmd/headscale/cli/utils.go +++ b/cmd/headscale/cli/utils.go @@ -435,8 +435,8 @@ func getHeadscaleApp() (*headscale.Headscale, error) { // We are doing this here, as in the future could be cool to have it also hot-reload - if viper.GetString("acl_policy_path") != "" { - aclPath := absPath(viper.GetString("acl_policy_path")) + if cfg.ACL.PolicyPath != "" { + aclPath := absPath(cfg.ACL.PolicyPath) err = app.LoadACLPolicy(aclPath) if err != nil { log.Fatal().