Skip to content

Commit

Permalink
Moved auth header outside of the block
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <vr@labstack.com>
  • Loading branch information
vishr committed Sep 1, 2015
1 parent 8aaf620 commit 23c02a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/auth.go
Expand Up @@ -39,11 +39,11 @@ func BasicAuth(fn BasicValidateFunc) echo.HandlerFunc {
if fn(cred[:i], cred[i+1:]) {
return nil
}
c.Response().Header().Set(echo.WWWAuthenticate, Basic + " realm=Restricted")
}
}
}
}
c.Response().Header().Set(echo.WWWAuthenticate, Basic + " realm=Restricted")
return echo.NewHTTPError(http.StatusUnauthorized)
}
}

0 comments on commit 23c02a6

Please sign in to comment.