mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
nmh: fix loopback ip
This commit is contained in:
parent
b78783dc94
commit
1e6da3ac8e
1 changed files with 2 additions and 2 deletions
|
@ -113,7 +113,7 @@ func isFileGateway(port string) bool {
|
|||
client := &http.Client{}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
|
||||
defer cancel()
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", "http://192.168.184.136:"+port+"/file", nil)
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", "http://127.0.0.1:"+port+"/file", nil)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ func isGrpcWebServer(port string) bool {
|
|||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
|
||||
defer cancel()
|
||||
var data = strings.NewReader(`AAAAAAIQFA==`)
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", "http://192.168.184.136:"+port+"/anytype.ClientCommands/AppGetVersion", data)
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", "http://127.0.0.1:"+port+"/anytype.ClientCommands/AppGetVersion", data)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue