The one-liner node.js proxy middleware for connect, express, next.js and more
92
Pending
Does it follow best practices?
Impact
92%
1.24xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how well the engineer uses http-proxy-middleware to solve the request body fixing problem. The focus is on correctly importing and using the createProxyMiddleware function and the fixRequestBody handler to reconstruct request bodies that have been consumed by body-parser middleware.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import createProxyMiddleware",
"description": "Correctly imports the createProxyMiddleware function from http-proxy-middleware package",
"max_score": 10
},
{
"name": "Import fixRequestBody",
"description": "Correctly imports the fixRequestBody handler from http-proxy-middleware package",
"max_score": 15
},
{
"name": "Create proxy middleware",
"description": "Uses createProxyMiddleware to create proxy middleware with appropriate configuration (target, changeOrigin, etc.)",
"max_score": 20
},
{
"name": "Register fixRequestBody handler",
"description": "Registers the fixRequestBody handler in the on.proxyReq event to fix request bodies after body-parser consumption",
"max_score": 30
},
{
"name": "Apply to JSON route",
"description": "Applies the proxy middleware to the /api/data route after body-parser.json() middleware",
"max_score": 10
},
{
"name": "Apply to form route",
"description": "Applies the proxy middleware to the /api/form route after body-parser.urlencoded() middleware",
"max_score": 10
},
{
"name": "Proper middleware ordering",
"description": "Ensures body-parser middleware is registered before the proxy middleware so request bodies are parsed first then fixed for proxying",
"max_score": 5
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10