Skip to content

Commit df67bc6

Browse files
authored
1 parent b12dc1d commit df67bc6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/fetch-http-handler/src/fetch-http-handler.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,12 @@ export class FetchHttpHandler implements HttpHandler<FetchHttpHandlerConfig> {
112112
headers: new Headers(request.headers),
113113
method: method,
114114
credentials,
115-
cache: this.config!.cache ?? "default",
116115
};
116+
// cache property is not supported in workerd runtime
117+
// TODO: can we feature detect support for cache and not set this property when not supported?
118+
if (this.config?.cache) {
119+
requestOptions.cache = this.config.cache;
120+
}
117121

118122
if (body) {
119123
requestOptions.duplex = "half";

0 commit comments

Comments
 (0)