Skip to content

Add a guard for native Node HTTP servers - #108

Merged
cport1 merged 1 commit into
mainfrom
feat/native-node-http-guard
Nov 25, 2026
Merged

cport1 merged 1 commit into
mainfrom
feat/native-node-http-guard

Conversation

@cport1

@cport1 cport1 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Adds createNodeHttpGuard() to @webdecoy/node for servers built directly with node:http. It feeds the native request metadata to the existing rules pipeline and defaults to monitor mode. In enforce mode it returns a typed 403 or 429 response descriptor for the handler to write. The incoming request stream stays available, and forwarded addresses are trusted only when configured.

The adapter uses a structural request type so the package continues to ship an edge-compatible entry point. The README and SDK reference document the new integration.

Validation on Node 22: full build, lint, tests, and edge-runtime checks passed. Four loopback HTTP tests cover monitor and enforce modes, skipped paths, retry headers, proxy trust, raw query handling, and request-stream preservation.

@cport1
cport1 merged commit 0c5a048 into main Nov 25, 2026
2 checks passed
@cport1
cport1 deleted the feat/native-node-http-guard branch November 25, 2026 19:10
@cport1 cport1 mentioned this pull request Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant