mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 07:58:22 -05:00
Remove API Middleware (#13243)
* remove api/gateway/apimiddleware * fix errors in api/gateway * remove beacon-chain/rpc/apimiddleware * fix errors in api/client/beacon * fix errors in validator/client/beacon-api * fix errors in beacon-chain/node * fix errors in validator/node * fix errors in cmd/prysmctl/validator * fix errors in testing/endtoend * fix all other code * remove comment * fix tests --------- Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -40,7 +40,6 @@ go_library(
|
||||
],
|
||||
deps = [
|
||||
"//api/gateway:go_default_library",
|
||||
"//api/gateway/apimiddleware:go_default_library",
|
||||
"//api/server:go_default_library",
|
||||
"//async/event:go_default_library",
|
||||
"//cmd:go_default_library",
|
||||
|
||||
@@ -27,7 +27,6 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
fastssz "github.com/prysmaticlabs/fastssz"
|
||||
"github.com/prysmaticlabs/prysm/v4/api/gateway"
|
||||
"github.com/prysmaticlabs/prysm/v4/api/gateway/apimiddleware"
|
||||
"github.com/prysmaticlabs/prysm/v4/api/server"
|
||||
"github.com/prysmaticlabs/prysm/v4/async/event"
|
||||
"github.com/prysmaticlabs/prysm/v4/cmd"
|
||||
@@ -814,7 +813,7 @@ func (c *ValidatorClient) registerRPCGatewayService(router *mux.Router) error {
|
||||
gwruntime.WithForwardResponseOption(gateway.HttpResponseModifier),
|
||||
)
|
||||
|
||||
muxHandler := func(_ *apimiddleware.ApiProxyMiddleware, h http.HandlerFunc, w http.ResponseWriter, req *http.Request) {
|
||||
muxHandler := func(h http.HandlerFunc, w http.ResponseWriter, req *http.Request) {
|
||||
// The validator gateway handler requires this special logic as it serves the web APIs and the web UI.
|
||||
if strings.HasPrefix(req.URL.Path, "/api") {
|
||||
req.URL.Path = strings.Replace(req.URL.Path, "/api", "", 1)
|
||||
|
||||
Reference in New Issue
Block a user