Access Durable Object jurisdiction via ctx.id.jurisdiction
Durable Objects now expose the jurisdiction they were created in through ctx.id.jurisdiction, enabling region-aware decisions without passing jurisdiction through method arguments or storing it separately. Existing alarms scheduled before March 15, 2026 require rescheduling to populate this value.
ctx.id.jurisdiction inside a Durable Object now reports the jurisdiction the object was created in — for example "eu" when accessed through env.MY_DURABLE_OBJECT.jurisdiction("eu") — so you can make region-aware decisions without passing the jurisdiction through method arguments or persisting it in storage. For the full list of ID-construction paths that preserve jurisdiction, refer to the Durable Object ID documentation.
export class RegionalRoom extends DurableObject {
async fetch(request) {
// "eu" when accessed through env.MY_DURABLE_OBJECT.jurisdiction("eu")
const region = this.ctx.id.jurisdiction;
return new Response(`Hello from ${region ?? "the default region"}!`);
}
}
// Worker
export default {
async fetch(request, env) {
const stub = env.MY_DURABLE_OBJECT.jurisdiction("eu").getByName("general");
return stub.fetch(request);
},
};
ctx.id.jurisdiction is undefined for Durable Objects that were not created in a jurisdiction-restricted namespace. Alarms scheduled before 2026-03-15 also do not have jurisdiction stored; to backfill the value, reschedule the alarm from a fetch() or RPC handler.
Source: original entry ↗
More from Cloudflare
Follow Cloudflare to get its new changes in your feed and email digest.
Cloudflare One Client for Windows hotfix - trusted certificate chains
A new GA release for Windows Cloudflare One Client is available, addressing an issue with building trusted certificate chains.
Cloudflare One Client for macOS - Trusted Certificate Chain Fix
A new GA release of the macOS Cloudflare One Client is available. This hotfix addresses an issue with building trusted certificate chains.
Cloudflare One Client for Linux
A new GA release of Cloudflare One Client for Linux is now available. This hotfix addresses an issue with building trusted certificate chains.