Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2022-11-27 | Fix `console.log(process.env)` | 2 | -20/+27 | ||
From e15fb6b9b220510df049e782d4f2f6eb3150d069 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Thu, 22 Sep 2022 01:57:06 -0700 Subject: [breaking] Bun.serve().hostname should return the hostname instead of the baseURI Previously Bun.serve().hostname was returning the baseURI, effectively the `origin` That was incorrect. Instead, it should be returning the hostname --- src/bun.js/api/server.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index c3501019a..12b383f05 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -2007,7 +2007,7 @@ pub fn NewServer(comptime ssl_enabled_: bool, comptime debug_mode_: bool) type { } pub fn getHostname(this: *ThisServer, globalThis: *JSGlobalObject) JSC.JSValue { - return ZigString.init(this.config.base_uri).toValue(globalThis); + return ZigString.init(bun.span(this.config.hostname)).toValue(globalThis); } pub fn getDevelopment( -- cgit v1.2.3
aboutsummaryrefslogtreecommitdiff |
Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2022-11-27 | Fix `console.log(process.env)` | 2 | -20/+27 | ||