api access controll
This commit is contained in:
parent
5d59f8f11f
commit
f2f383bdd0
4
main.go
4
main.go
@ -45,8 +45,8 @@ func main() {
|
||||
|
||||
if config.Webserver.Enable {
|
||||
router := httprouter.New()
|
||||
if config.Webserver.Api.NewNode {
|
||||
api.NewNodes(config,router,"/api/nodess",nodes)
|
||||
if config.Webserver.Api.NewNodes {
|
||||
api.NewNodes(config,router,"/api/nodes",nodes)
|
||||
log.Println("api nodes started")
|
||||
}
|
||||
if config.Webserver.Api.Aliases {
|
||||
|
@ -22,7 +22,7 @@ type Config struct {
|
||||
Webroot string `yaml:"webroot"`
|
||||
Api struct {
|
||||
Passphrase string `yaml:"passphrase"`
|
||||
NewNode bool `yaml:"newnode"`
|
||||
NewNodes bool `yaml:"newnodes"`
|
||||
Aliases bool `yaml:"aliases"`
|
||||
} `yaml:"api"`
|
||||
} `yaml:"webserver"`
|
||||
|
Loading…
Reference in New Issue
Block a user