1
0
Fork 0
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:
Roman Khafizianov 2024-02-19 15:39:26 +01:00
parent b78783dc94
commit 1e6da3ac8e
No known key found for this signature in database
GPG key ID: F07A7D55A2684852

View file

@ -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