Skip to content

fix(deno-deploy): add req.ip#4196

Merged
pi0 merged 1 commit into
nitrojs:mainfrom
huseeiin:deno-deploy-ip
Apr 13, 2026
Merged

fix(deno-deploy): add req.ip#4196
pi0 merged 1 commit into
nitrojs:mainfrom
huseeiin:deno-deploy-ip

Conversation

@huseeiin
Copy link
Copy Markdown
Contributor

@huseeiin huseeiin commented Apr 9, 2026

add ip to deno deploy
its the same as how srvx adds ip to deno, info.remoteAddr.hostname

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@huseeiin huseeiin requested a review from pi0 as a code owner April 9, 2026 09:39
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

@huseeiin is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

📝 Walkthrough

Walkthrough

Implemented IP address propagation in Deno Deploy runtime by assigning the remote address hostname to the request IP before request processing, replacing a TODO comment with actual functionality.

Changes

Cohort / File(s) Summary
Deno Deploy Runtime IP Configuration
src/presets/deno/runtime/deno-deploy.ts
Replaced TODO comment with implementation that sets req.ip to info.remoteAddr.hostname before websocket handling and request delegation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title contains a typo ('deno-deply' instead of 'deno-deploy') and uses 'fix' scope when the PR is actually a feature addition (adding IP support), violating conventional commits standards. Correct the title to 'feat(deno-deploy): add req.ip' to accurately reflect the feature addition and fix the typo.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is directly related to the changeset, explaining the IP addition to Deno Deploy and referencing the implementation approach used by srvx.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4196

commit: d158e5a

@pi0
Copy link
Copy Markdown
Member

pi0 commented Apr 9, 2026

Can you please help to migrate deno to srvx adapter? 🙏🏼 It could be more benefitial for long term maintenance

@huseeiin
Copy link
Copy Markdown
Contributor Author

huseeiin commented Apr 9, 2026

Can you please help to migrate deno to srvx adapter? 🙏🏼 It could be more benefitial for long term maintenance

what will srvx add? it adds stuff like host and tls which don't make sense for deno deploy, since it takes care of those things itself.

@pi0 pi0 changed the title feat: add ip to deno deploy fix(deno-deply: add req.ip` Apr 13, 2026
@pi0 pi0 changed the title fix(deno-deply: add req.ip` fix(deno-deply): add req.ip Apr 13, 2026
@pi0 pi0 merged commit c376960 into nitrojs:main Apr 13, 2026
10 of 11 checks passed
@pi0 pi0 changed the title fix(deno-deply): add req.ip fix(deno-deploy): add req.ip Apr 13, 2026
RihanArfan pushed a commit that referenced this pull request Apr 16, 2026
RihanArfan pushed a commit that referenced this pull request Apr 27, 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.

2 participants