From e515005083ef83dc1978359c78fd16f10c3a5f9b Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Mon, 13 Apr 2020 23:05:39 +0100 Subject: [PATCH] Remove only allowing certain methods --- api/handler/rpc/rpc.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/api/handler/rpc/rpc.go b/api/handler/rpc/rpc.go index 58493c49..d9ff31ad 100644 --- a/api/handler/rpc/rpc.go +++ b/api/handler/rpc/rpc.go @@ -100,11 +100,6 @@ func (h *rpcHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } - if h.opts.Router == nil && r.Method != "GET" { - writeError(w, r, errors.MethodNotAllowed("go.micro.api", "method not allowed")) - return - } - ct := r.Header.Get("Content-Type") // Strip charset from Content-Type (like `application/json; charset=UTF-8`)