From ee7d8825ae096bbf7e84711595c54868400a9809 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Fri, 30 Apr 2021 11:09:44 +0200 Subject: [PATCH] fix(routes): skip over endpoints that are DenyHTTP --- lib/routes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/routes.go b/lib/routes.go index 00c4c51e2..be2810b03 100644 --- a/lib/routes.go +++ b/lib/routes.go @@ -13,6 +13,9 @@ func (inst *Instance) GiveAPIServer(middleware func(handler http.HandlerFunc) ht if arrayContainsString(ignoreMethods, methodName) { continue } + if call.Endpoint == DenyHTTP { + continue + } handler := middleware(NewHTTPRequestHandler(inst, methodName)) // All endpoints use POST verb httpVerb := http.MethodPost