diff options
author | 2022-09-22 01:57:06 -0700 | |
---|---|---|
committer | 2022-09-22 01:57:06 -0700 | |
commit | e15fb6b9b220510df049e782d4f2f6eb3150d069 (patch) | |
tree | 26a3c1fa7907a000ee017f611a8d8eb2ec48970b /src | |
parent | f1ffc72a624a31c7c16d5daad28facd40c7f73e2 (diff) | |
download | bun-e15fb6b9b220510df049e782d4f2f6eb3150d069.tar.gz bun-e15fb6b9b220510df049e782d4f2f6eb3150d069.tar.zst bun-e15fb6b9b220510df049e782d4f2f6eb3150d069.zip |
[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
Diffstat (limited to 'src')
-rw-r--r-- | src/bun.js/api/server.zig | 2 |
1 files changed, 1 insertions, 1 deletions
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( |