add global config support
This commit is contained in:
parent
cd1e1a42f3
commit
34d553a890
23 changed files with 1682 additions and 343 deletions
|
|
@ -105,7 +105,7 @@ func StopCaddy() touka.HandlerFunc {
|
|||
return
|
||||
}
|
||||
client := c.GetHTTPC()
|
||||
rb := client.NewRequestBuilder("POST", "http://127.0.0.1:2019/stop")
|
||||
rb := client.NewRequestBuilder("POST", "http://localhost:2019/stop")
|
||||
resp, err := rb.Execute()
|
||||
if err != nil {
|
||||
c.JSON(500, map[string]string{"error": err.Error()})
|
||||
|
|
@ -139,7 +139,7 @@ func RestartCaddy(cfg *config.Config) touka.HandlerFunc {
|
|||
|
||||
// StopCaddy
|
||||
client := c.GetHTTPC()
|
||||
rb := client.NewRequestBuilder("POST", "http://127.0.0.1:2019/stop")
|
||||
rb := client.NewRequestBuilder("POST", "http://localhost:2019/stop")
|
||||
resp, err := rb.Execute()
|
||||
if err != nil {
|
||||
c.JSON(500, map[string]string{"error": err.Error()})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue