CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-http-proxy-middleware

The one-liner node.js proxy middleware for connect, express, next.js and more

92

1.24x
Quality

Pending

Does it follow best practices?

Impact

92%

1.24x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-1/

{
  "context": "This criteria evaluates the engineer's ability to use http-proxy-middleware's pathRewrite capability to transform request paths before forwarding to backend services. The evaluation focuses on proper usage of both regex-based and function-based path rewriting approaches.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "createProxyMiddleware usage",
      "description": "Uses createProxyMiddleware function to create proxy middleware instances for all three endpoints (legacy API, new API version, and admin dashboard).",
      "max_score": 15
    },
    {
      "name": "Regex pathRewrite",
      "description": "Implements regex-based pathRewrite configuration using an object with regex patterns as keys for the legacy API endpoint (e.g., {'^/api/v1': '/legacy'}) to remove prefix and add base path.",
      "max_score": 20
    },
    {
      "name": "Multiple regex rules",
      "description": "Implements regex-based pathRewrite for the new API version endpoint to replace the path prefix (e.g., {'^/api/v2': '/v2/services'}).",
      "max_score": 20
    },
    {
      "name": "Function-based pathRewrite",
      "description": "Implements function-based pathRewrite for the admin endpoint that accepts (path, req) parameters and dynamically transforms the path based on the X-User-Role header.",
      "max_score": 25
    },
    {
      "name": "Target configuration",
      "description": "Correctly configures the target option for each proxy middleware instance to point to the appropriate backend server (localhost:4001, localhost:4002, localhost:4003).",
      "max_score": 10
    },
    {
      "name": "changeOrigin option",
      "description": "Sets the changeOrigin option to true for proxy middleware instances to enable proper host header changes.",
      "max_score": 10
    }
  ]
}

tile.json