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:
parent
c222eb9945
commit
a08b1f3458
1 changed files with 2 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue