Skip to content

refactor(app): replace deprecated req.connection with req.socket - #523

Open
CharoenwitKunna wants to merge 1 commit into
tinyhttp:masterfrom
CharoenwitKunna:fix/req-socket-deprecation
Open

CharoenwitKunna wants to merge 1 commit into
tinyhttp:masterfrom
CharoenwitKunna:fix/req-socket-deprecation

Conversation

@CharoenwitKunna

Copy link
Copy Markdown

Replaces deprecated req.connection usage with req.socket (Node 13+).

  • getIP/getIPs now use Pick<Request, 'headers' | 'socket'> — matches forwarded and proxy-addr which already migrated to socket-only
  • Request.connection kept for BC but marked @deprecated

Zero runtime req.connection hits remain; only the deprecated interface alias stays for compatibility.

Related to #316 pattern.

@v1rtl

v1rtl commented Sep 12, 2026

Copy link
Copy Markdown
Member

It's a type-only deprecation right? Does Express also deprecate it or it's only concerning node http module?

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.

2 participants