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

{
  "context": "This criteria evaluates how well the engineer uses http-proxy-middleware's dynamic routing capabilities to implement a multi-tenant API gateway. The focus is on proper usage of the router option with table-based routing configuration.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "createProxyMiddleware usage",
      "description": "Uses createProxyMiddleware function to create the proxy middleware instance",
      "max_score": 10
    },
    {
      "name": "router option",
      "description": "Implements the router option to define routing logic (either as an object for table-based routing or as a function)",
      "max_score": 25
    },
    {
      "name": "tenant-based routing",
      "description": "Correctly routes requests based on tenant subdomains in the Host header (acme.localhost:3000 -> localhost:8001, globex.localhost:3000 -> localhost:8002, initech.localhost:3000 -> localhost:8003)",
      "max_score": 20
    },
    {
      "name": "path-based routing",
      "description": "Correctly implements path-based fallback routing for non-tenant requests (/api/v1/* -> localhost:8001, /api/v2/* -> localhost:8002, other paths -> localhost:9000)",
      "max_score": 20
    },
    {
      "name": "combined routing",
      "description": "Correctly implements combined tenant+path routing with proper precedence (acme.localhost:3000/legacy/* -> localhost:7000)",
      "max_score": 15
    },
    {
      "name": "changeOrigin option",
      "description": "Sets changeOrigin: true to properly modify the Origin header to match the target server",
      "max_score": 10
    }
  ]
}

tile.json