portainer/portainer

View on GitHub
api/http/handler/handler.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Handler.ServeHTTP has 89 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    switch {
    case strings.HasPrefix(r.URL.Path, "/api/endpoints") && strings.Contains(r.URL.Path, "/edge/"):
        h.EndpointEdgeHandler.ServeHTTP(w, r)
    case strings.HasPrefix(r.URL.Path, "/api/auth"):
Severity: Major
Found in api/http/handler/handler.go - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status