mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01: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…
	
		Reference in New Issue
	
	Block a user