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-7/

{
  "context": "This criteria evaluates how well the engineer utilizes http-proxy-middleware's advanced routing capabilities to implement a multi-tenant API gateway with both static and dynamic routing logic.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "createProxyMiddleware usage",
      "description": "Uses createProxyMiddleware function from http-proxy-middleware to create the proxy middleware instance",
      "max_score": 15
    },
    {
      "name": "router option implementation",
      "description": "Implements the router option as an async function that takes the request object as parameter and returns target URLs dynamically",
      "max_score": 30
    },
    {
      "name": "Static routing logic",
      "description": "Correctly implements static tenant-to-backend mapping within the router function for tenant-a, tenant-b, and tenant-c",
      "max_score": 15
    },
    {
      "name": "Async dynamic routing",
      "description": "Implements asynchronous tenant lookup logic using async/await or Promises within the router function for unknown tenants",
      "max_score": 20
    },
    {
      "name": "Request header access",
      "description": "Accesses X-Tenant-ID from request headers within the router function to determine routing target",
      "max_score": 10
    },
    {
      "name": "Error handling for invalid tenants",
      "description": "Returns null or undefined from router function or handles missing/invalid tenant IDs to trigger 404 responses",
      "max_score": 10
    }
  ]
}

tile.json