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 {
|
if config.Webserver.Enable {
|
||||||
router := httprouter.New()
|
router := httprouter.New()
|
||||||
if config.Webserver.Api.NewNode {
|
if config.Webserver.Api.NewNodes {
|
||||||
api.NewNodes(config,router,"/api/nodess",nodes)
|
api.NewNodes(config,router,"/api/nodes",nodes)
|
||||||
log.Println("api nodes started")
|
log.Println("api nodes started")
|
||||||
}
|
}
|
||||||
if config.Webserver.Api.Aliases {
|
if config.Webserver.Api.Aliases {
|
||||||
|
@ -22,7 +22,7 @@ type Config struct {
|
|||||||
Webroot string `yaml:"webroot"`
|
Webroot string `yaml:"webroot"`
|
||||||
Api struct {
|
Api struct {
|
||||||
Passphrase string `yaml:"passphrase"`
|
Passphrase string `yaml:"passphrase"`
|
||||||
NewNode bool `yaml:"newnode"`
|
NewNodes bool `yaml:"newnodes"`
|
||||||
Aliases bool `yaml:"aliases"`
|
Aliases bool `yaml:"aliases"`
|
||||||
} `yaml:"api"`
|
} `yaml:"api"`
|
||||||
} `yaml:"webserver"`
|
} `yaml:"webserver"`
|
||||||
|
Loading…
Reference in New Issue
Block a user