We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07b916e commit a75a0c8Copy full SHA for a75a0c8
packages/actor-core/src/common/utils.ts
@@ -3,7 +3,12 @@ import type { ContentfulStatusCode } from "hono/utils/http-status";
3
import * as errors from "@/actor/errors";
4
import type { Logger } from "./log";
5
6
-export const ActorKeySchema = z.array(z.string());
+// Maximum size of a key component in bytes
7
+// Set to 128 bytes to allow for separators and escape characters in the full key
8
+// Cloudflare's maximum key size is 512 bytes, so we need to be significantly smaller
9
+export const MAX_KEY_SIZE = 128;
10
+
11
+export const ActorKeySchema = z.array(z.string().max(MAX_KEY_SIZE));
12
13
export type ActorKey = z.infer<typeof ActorKeySchema>;
14
0 commit comments