diff options
author | 2022-04-11 05:17:02 -0700 | |
---|---|---|
committer | 2022-04-11 05:17:02 -0700 | |
commit | 4708dd26cac2a3c0f5fac740252cbe5b51e77a79 (patch) | |
tree | 81607f71a4a20888857020a3a0427003457eea6a /src/javascript | |
parent | 3e969244ac2a1b60ba7cea2aeff286b0d5dc3dc6 (diff) | |
download | bun-4708dd26cac2a3c0f5fac740252cbe5b51e77a79.tar.gz bun-4708dd26cac2a3c0f5fac740252cbe5b51e77a79.tar.zst bun-4708dd26cac2a3c0f5fac740252cbe5b51e77a79.zip |
work around fetch("localhost") bug
Diffstat (limited to 'src/javascript')
-rw-r--r-- | src/javascript/jsc/webcore/response.zig | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/javascript/jsc/webcore/response.zig b/src/javascript/jsc/webcore/response.zig index a72c1d134..7043769fa 100644 --- a/src/javascript/jsc/webcore/response.zig +++ b/src/javascript/jsc/webcore/response.zig @@ -667,8 +667,6 @@ pub const Fetch = struct { .{}, ); - const fetch_error_cant_fetch_same_origin = "fetch to same-origin on the server is not supported yet - sorry! (it would just hang forever)"; - pub const FetchTasklet = struct { promise: *JSInternalPromise = undefined, http: HTTPClient.AsyncHTTP = undefined, @@ -975,11 +973,6 @@ pub const Fetch = struct { return JSPromise.rejectedPromiseValue(globalThis, ZigString.init(fetch_error).toErrorInstance(globalThis)).asRef(); } - if (url.origin.len > 0 and strings.eql(url.origin, VirtualMachine.vm.bundler.options.origin.origin)) { - const fetch_error = fetch_error_cant_fetch_same_origin; - return JSPromise.rejectedPromiseValue(globalThis, ZigString.init(fetch_error).toErrorInstance(globalThis)).asRef(); - } - var header_entries: Headers.Entries = .{}; var header_buf: string = ""; |