Load ACL policy on headscale startup
This commit is contained in:
parent
401e6aec32
commit
202d6b506f
4 changed files with 18 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue