Skip to content

Commit

Permalink
Merge pull request #446 from tablelandnetwork/jsign/extralogs
Browse files Browse the repository at this point in the history
logs: add warn log to detect calls to legacy RPC
  • Loading branch information
jsign authored Jan 24, 2023
2 parents b1ac497 + cc8c53e commit 17e8ae7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/router/middlewares/ratelim.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"time"

"github.com/gorilla/mux"
"github.com/rs/zerolog/log"
"github.com/sethvargo/go-limiter/httplimit"
"github.com/sethvargo/go-limiter/memorystore"
"github.com/textileio/go-tableland/pkg/errors"
Expand Down Expand Up @@ -86,6 +87,7 @@ func RateLimitController(cfg RateLimiterConfig) (mux.MiddlewareFunc, error) {
_ = json.NewEncoder(w).Encode(errors.ServiceError{Message: "reading request body"})
return
}
log.Warn().Str("body", string(fullBody)).Msg("call to legacy RPC")
var rpcMethod struct {
Method string `json:"method"`
}
Expand Down

0 comments on commit 17e8ae7

Please sign in to comment.