diff --git a/cmd/microrouterd/handler/handler.go b/cmd/microrouterd/handler/handler.go index 68914f2..70ba489 100644 --- a/cmd/microrouterd/handler/handler.go +++ b/cmd/microrouterd/handler/handler.go @@ -180,7 +180,7 @@ func (h *Handler) proxy(serviceName string, route *routerclientpb.RoutesReply_Ro // Auth ctx, err := h.routerAuth.ForwardContext(c.Request, c) - if err != nil || authRequired { + if err != nil && authRequired { c.JSON(http.StatusUnauthorized, gin.H{ "status": http.StatusUnauthorized, "message": err,