Fix command get policy works with relative policy path (#2051)
This commit is contained in:
parent
fcd1183805
commit
022fb24cd9
1 changed files with 2 additions and 1 deletions
|
@ -692,7 +692,8 @@ func (api headscaleV1APIServer) GetPolicy(
|
|||
}, nil
|
||||
case types.PolicyModeFile:
|
||||
// Read the file and return the contents as-is.
|
||||
f, err := os.Open(api.h.cfg.Policy.Path)
|
||||
absPath := util.AbsolutePathFromConfigPath(api.h.cfg.Policy.Path)
|
||||
f, err := os.Open(absPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue