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

{
  "context": "This criteria evaluates how well the engineer uses http-proxy-middleware to solve the POST request body handling problem when body-parser middleware is used. The focus is on proper usage of the fixRequestBody handler and correct proxy configuration.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import fixRequestBody",
      "description": "Uses the fixRequestBody export from http-proxy-middleware package (e.g., const { createProxyMiddleware, fixRequestBody } = require('http-proxy-middleware'))",
      "max_score": 15
    },
    {
      "name": "Create proxy middleware",
      "description": "Uses createProxyMiddleware function to create proxy middleware with appropriate configuration",
      "max_score": 15
    },
    {
      "name": "Configure target",
      "description": "Configures the target option to point to the backend server URL",
      "max_score": 10
    },
    {
      "name": "Use on.proxyReq event",
      "description": "Uses the on.proxyReq event handler option to intercept the outgoing proxy request",
      "max_score": 20
    },
    {
      "name": "Apply fixRequestBody",
      "description": "Registers fixRequestBody as the proxyReq event handler (e.g., on: { proxyReq: fixRequestBody })",
      "max_score": 30
    },
    {
      "name": "Body-parser integration",
      "description": "Correctly uses Express body-parser middleware before the proxy middleware to parse and log request bodies",
      "max_score": 10
    }
  ]
}

tile.json