mirror of
https://github.com/fatedier/frp.git
synced 2026-05-21 06:45:32 -06:00
update for strict config (#3779)
This commit is contained in:
parent
e8deb65c4b
commit
526e809bd5
15 changed files with 99 additions and 70 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
|
|
@ -69,8 +70,16 @@ func (c *Client) GetAllProxyStatus() (client.StatusResp, error) {
|
|||
return allStatus, nil
|
||||
}
|
||||
|
||||
func (c *Client) Reload() error {
|
||||
req, err := http.NewRequest("GET", "http://"+c.address+"/api/reload", nil)
|
||||
func (c *Client) Reload(strictMode bool) error {
|
||||
v := url.Values{}
|
||||
if strictMode {
|
||||
v.Set("strictConfig", "true")
|
||||
}
|
||||
queryStr := ""
|
||||
if len(v) > 0 {
|
||||
queryStr = "?" + v.Encode()
|
||||
}
|
||||
req, err := http.NewRequest("GET", "http://"+c.address+"/api/reload"+queryStr, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue