Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/actor-core/src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import type { ContentfulStatusCode } from "hono/utils/http-status";
import * as errors from "@/actor/errors";
import type { Logger } from "./log";

export const ActorKeySchema = z.array(z.string());
// Maximum size of a key component in bytes
// Set to 128 bytes to allow for separators and escape characters in the full key
// Cloudflare's maximum key size is 512 bytes, so we need to be significantly smaller
export const MAX_KEY_SIZE = 128;

export const ActorKeySchema = z.array(z.string().max(MAX_KEY_SIZE));

export type ActorKey = z.infer<typeof ActorKeySchema>;

Expand Down
Loading