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:
@@ -57,11 +57,9 @@ func (intercept InterceptErrors) ErrorInterceptor(next http.Handler) http.Handle
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
rec := newResponseRecorder(w)
|
||||
next.ServeHTTP(rec, r)
|
||||
//Set Server name
|
||||
w.Header().Set("Server", "Goma")
|
||||
if canIntercept(rec.statusCode, intercept.Errors) {
|
||||
logger.Debug("Backend error intercepted")
|
||||
logger.Debug("An error occurred in the backend, %d", rec.statusCode)
|
||||
logger.Error("Backend error")
|
||||
logger.Error("An error occurred in the backend, %d", rec.statusCode)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(rec.statusCode)
|
||||
err := json.NewEncoder(w).Encode(ProxyResponseError{
|
||||
|
||||
Reference in New Issue
Block a user