1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-11 17:53:10 +02:00

Use config object instead of viper for policy path

This commit is contained in:
Kristoffer Dalby 2022-05-31 12:50:43 +02:00
parent af44dc589d
commit e4faa79bdb

View File

@ -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().