diff --git a/pkg/services/oracle/network.go b/pkg/services/oracle/network.go index 3f07393e1..d4b096215 100644 --- a/pkg/services/oracle/network.go +++ b/pkg/services/oracle/network.go @@ -87,7 +87,7 @@ func getDefaultClient(cfg config.OracleConfiguration) *http.Client { } client.Timeout = cfg.RequestTimeout client.CheckRedirect = func(req *http.Request, via []*http.Request) error { - if len(via) >= maxRedirections { // from https://github.com/neo-project/neo-modules/pull/694 + if len(via) > maxRedirections { // from https://github.com/neo-project/neo-modules/pull/698 return fmt.Errorf("%w: %d redirections are reached", ErrRestrictedRedirect, maxRedirections) } return nil diff --git a/pkg/services/oracle/oracle.go b/pkg/services/oracle/oracle.go index a67a6f1e2..bd3a04e7c 100644 --- a/pkg/services/oracle/oracle.go +++ b/pkg/services/oracle/oracle.go @@ -110,7 +110,7 @@ const ( defaultRefreshInterval = time.Minute * 3 // maxRedirections is the number of allowed redirections for Oracle HTTPS request. - maxRedirections = 5 + maxRedirections = 2 ) // ErrRestrictedRedirect is returned when redirection to forbidden address occurs