Skip to content

Commit

Permalink
Merge pull request #22 from upstash/vec-131-vector-sdk-cloudflare-error
Browse files Browse the repository at this point in the history
fix: cloudflare incompatibility
  • Loading branch information
ogzhanolguncu committed Apr 17, 2024
2 parents 801870c + bf8f889 commit 801c666
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ export class Index<
baseUrl: url,
retry: configOrRequester?.retry,
headers: { authorization: `Bearer ${token}` },
cache: configOrRequester?.cache || "no-store",
cache: configOrRequester?.cache === false
? undefined
: configOrRequester?.cache || "no-store",
signal: configOrRequester?.signal,
});

Expand Down
3 changes: 2 additions & 1 deletion src/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ type CacheSetting =
| "no-cache"
| "no-store"
| "only-if-cached"
| "reload";
| "reload"
| false;

export type UpstashRequest = {
path?: string[];
Expand Down

0 comments on commit 801c666

Please sign in to comment.