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

{
  "context": "This criteria evaluates how effectively the engineer uses http-proxy-middleware's path filtering capabilities to selectively proxy requests based on URL patterns, including string paths, glob patterns, and negation patterns.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "createProxyMiddleware usage",
      "description": "Uses the createProxyMiddleware function from http-proxy-middleware to create proxy middleware instances",
      "max_score": 20
    },
    {
      "name": "target configuration",
      "description": "Correctly configures the target option to point to http://localhost:4000",
      "max_score": 10
    },
    {
      "name": "pathFilter for string",
      "description": "Uses pathFilter option with string pattern '/api/users/**' or equivalent glob pattern to match user API paths",
      "max_score": 15
    },
    {
      "name": "pathFilter for glob",
      "description": "Uses pathFilter option with glob pattern '/api/data/*.json' or equivalent to match JSON data files",
      "max_score": 15
    },
    {
      "name": "negation pattern",
      "description": "Implements negation to exclude '/api/users/health' from proxying, either using negation pattern syntax (e.g., ['path', '!**/health']) or custom filter function",
      "max_score": 20
    },
    {
      "name": "changeOrigin configuration",
      "description": "Sets changeOrigin: true in the proxy middleware options to modify the origin header",
      "max_score": 10
    },
    {
      "name": "logging configuration",
      "description": "Configures logging using the logger option (e.g., logger: console) or implements logging via the on.proxyReq event handler",
      "max_score": 10
    }
  ]
}

tile.json