Compare commits

..

3 Commits

Author SHA1 Message Date
Juan Font Alonso
cf9d920e4a Minor typo 2021-07-11 15:10:37 +02:00
Juan Font Alonso
7d46dfe012 Only load ACLs if a path is present 2021-07-11 15:10:11 +02:00
Juan Font Alonso
eabb1ce881 Fix minor typo on the register webpage 2021-07-11 15:05:32 +02:00
3 changed files with 8 additions and 5 deletions

2
api.go
View File

@@ -46,7 +46,7 @@ func (h *Headscale) RegisterWebAPI(c *gin.Context) {
<p>
<code>
<b>headscale -n NAMESPACE node register %s</b>
<b>headscale -n NAMESPACE nodes register %s</b>
</code>
</p>

2
app.go
View File

@@ -78,7 +78,7 @@ func NewHeadscale(cfg Config) (*Headscale, error) {
case "sqlite3":
dbString = cfg.DBpath
default:
return nil, errors.New("Unsupported DB")
return nil, errors.New("unsupported DB")
}
h := Headscale{

View File

@@ -121,10 +121,13 @@ func getHeadscaleApp() (*headscale.Headscale, error) {
}
// We are doing this here, as in the future could be cool to have it also hot-reload
if viper.GetString("acl_policy_path") != "" {
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
}