Fix authRequired

master
René Jochum 2 years ago
parent 5edfd81831
commit 101a7fa10c
Signed by: jochum
GPG Key ID: F7D906F5E51E8E5E

@ -180,7 +180,7 @@ func (h *Handler) proxy(serviceName string, route *routerclientpb.RoutesReply_Ro
// Auth // Auth
ctx, err := h.routerAuth.ForwardContext(c.Request, c) ctx, err := h.routerAuth.ForwardContext(c.Request, c)
if err != nil || authRequired { if err != nil && authRequired {
c.JSON(http.StatusUnauthorized, gin.H{ c.JSON(http.StatusUnauthorized, gin.H{
"status": http.StatusUnauthorized, "status": http.StatusUnauthorized,
"message": err, "message": err,

Loading…
Cancel
Save