1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-18 05:00:03 +02:00

src/eosapi/functions.go: in send() u.Host can contain port also. so we need to remove it when setting the Host header.

This commit is contained in:
Henrik Hautakoski 2020-03-20 14:58:59 +01:00
parent c222eb9945
commit a08b1f3458

View file

@ -2,6 +2,7 @@
package eosapi;
import (
"strings"
"time"
"net/url"
"io/ioutil"
@ -28,7 +29,7 @@ func send(method string, api_url string) (*req.Resp, error) {
// nodeos api does not like that, so we need to provide our
// own Host header with just the host.
headers := req.Header{
"Host": u.Host,
"Host": strings.Split(u.Host, ":")[0],
}
r := req.New()