From 8e34ec311e88b91335384bc45c8552cb3c09b058 Mon Sep 17 00:00:00 2001
From: mariusz4044 <89769547+mariusz4044@users.noreply.github.com>
Date: Sun, 19 Oct 2025 01:53:28 +0200
Subject: [PATCH] Fix IP address retrieval in server response (#23813)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
### What does this PR do?
Fix, response example - requestIP return object.
↓
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
---
docs/api/http.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/api/http.md b/docs/api/http.md
index f3e5b48e55..201e911cfe 100644
--- a/docs/api/http.md
+++ b/docs/api/http.md
@@ -536,7 +536,7 @@ You can also access the `Server` object from the `fetch` handler. It's the secon
const server = Bun.serve({
fetch(req, server) {
const ip = server.requestIP(req);
- return new Response(`Your IP is ${ip}`);
+ return new Response(`Your IP is ${ip.address}`);
},
});
```