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

{
  "context": "This criteria evaluates how well the engineer uses http-proxy-middleware's advanced WebSocket features, specifically external upgrade handling, WebSocket lifecycle event management, and upgrade request modification capabilities.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "External upgrade handling",
      "description": "Uses createProxyMiddleware with ws: true option and manually subscribes to the server's 'upgrade' event by calling server.on('upgrade', proxy.upgrade) instead of relying on automatic subscription.",
      "max_score": 30
    },
    {
      "name": "WebSocket lifecycle events",
      "description": "Implements event handlers for WebSocket lifecycle using the 'on' option with 'open' and 'close' event handlers to monitor WebSocket connection lifecycle.",
      "max_score": 25
    },
    {
      "name": "Upgrade request modification",
      "description": "Uses the 'proxyReqWs' event handler within the 'on' option to modify WebSocket upgrade requests, specifically adding the X-Forwarded-For header before forwarding.",
      "max_score": 25
    },
    {
      "name": "WebSocket proxy configuration",
      "description": "Correctly configures WebSocket proxy with appropriate target (ws://localhost:4001), ws: true option, and changeOrigin: true for proper WebSocket proxying.",
      "max_score": 10
    },
    {
      "name": "HTTP proxy integration",
      "description": "Creates a separate HTTP proxy middleware using createProxyMiddleware for API requests with appropriate target (http://localhost:4000) and path filtering for /api routes.",
      "max_score": 10
    }
  ]
}

tile.json