diff options
author | 2023-09-29 16:17:54 -0700 | |
---|---|---|
committer | 2023-09-29 16:17:54 -0700 | |
commit | eddb0078b5c9ff49bf67c0f1b1c2c623f0480b77 (patch) | |
tree | aa7954964d5a79e6d4efe9a149def0e1cfc30f19 /src/bun.js/api | |
parent | fa7d7bd1e4a701d1f5d3ec89f287f30a2dd0babb (diff) | |
download | bun-eddb0078b5c9ff49bf67c0f1b1c2c623f0480b77.tar.gz bun-eddb0078b5c9ff49bf67c0f1b1c2c623f0480b77.tar.zst bun-eddb0078b5c9ff49bf67c0f1b1c2c623f0480b77.zip |
fix(runtime): followup for `server.requestIP` (#6185)
* fix(runtime): followup for `server.requestIP`
* oops
* yeah
* sure
* Update src/deps/libuwsockets.cpp
* Update Dockerfile
* lol
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/api')
-rw-r--r-- | src/bun.js/api/server.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index 9d4a8a133..3fe411f39 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -4859,6 +4859,9 @@ pub fn NewServer(comptime NamespaceType: type, comptime ssl_enabled_: bool, comp extern fn JSSocketAddress__create(global: *JSC.JSGlobalObject, ip: JSValue, port: i32, is_ipv6: bool) JSValue; pub fn requestIP(this: *ThisServer, request: *JSC.WebCore.Request) JSC.JSValue { + if (this.config.address == .unix) { + return JSValue.jsNull(); + } return if (request.request_context.getRemoteSocketInfo()) |info| JSSocketAddress__create( this.globalThis, |