Fix new version of hujson
This commit is contained in:
parent
204f99dd51
commit
3ad2350c79
2 changed files with 16 additions and 2 deletions
9
acls.go
9
acls.go
|
@ -38,7 +38,14 @@ func (h *Headscale) LoadACLPolicy(path string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = hujson.Unmarshal(b, &policy)
|
||||
|
||||
ast, err := hujson.Parse(b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ast.Standardize()
|
||||
b = ast.Pack()
|
||||
err = json.Unmarshal(b, &policy)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue