mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-22 07:57:34 +00:00
Fix command get policy works with relative policy path (#2051)
This commit is contained in:
parent
fcd1183805
commit
022fb24cd9
@ -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…
x
Reference in New Issue
Block a user