mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-18 20:46:31 +09:00
Load ACL policy on headscale startup
This commit is contained in:
1 parent
401e6aec32
commit
202d6b506f
4 files changed
+18
-3
No files matched your search
@@ -119,6 +119,13 @@ func getHeadscaleApp() (*headscale.Headscale, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// We are doing this here, as in the future could be cool to have it also hot-reload
|
||||
err = h.LoadAclPolicy(absPath(viper.GetString("acl_policy_path")))
|
||||
if err != nil {
|
||||
log.Printf("Could not load the ACL policy: %s", err)
|
||||
}
|
||||
|
||||
return h, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user