feat: Add wildcard auth middleware paths (#24)
* chore: add concurrent route health check requests * feat: Add wildcard auth middleware paths * fix: bind privileged port permission denied on Kubernetes for nonroot user
This commit is contained in:
@@ -104,10 +104,10 @@ func (jwtAuth JwtAuth) AuthMiddleware(next http.Handler) http.Handler {
|
||||
if r.Header.Get(header) == "" {
|
||||
logger.Error("Proxy error, missing %s header", header)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
err := json.NewEncoder(w).Encode(ProxyResponseError{
|
||||
Message: "Missing Authorization header",
|
||||
Code: http.StatusForbidden,
|
||||
Message: http.StatusText(http.StatusUnauthorized),
|
||||
Code: http.StatusUnauthorized,
|
||||
Success: false,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user