Remove only allowing certain methods

This commit is contained in:
Asim Aslam 2020-04-13 23:05:39 +01:00 committed by Vasiliy Tolstov
parent 74e32e95f0
commit 2fafc81af7

5
rpc.go
View File

@ -100,11 +100,6 @@ func (h *rpcHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return 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") ct := r.Header.Get("Content-Type")
// Strip charset from Content-Type (like `application/json; charset=UTF-8`) // Strip charset from Content-Type (like `application/json; charset=UTF-8`)