Skip to content

fix(blob): pass R2 jurisdiction to generated wrangler bindings (#908) - #920

Open
blue-rigel wants to merge 1 commit into
nuxt-hub:mainfrom
blue-rigel:fix/blob-r2-jurisdiction-wrangler
Open

fix(blob): pass R2 jurisdiction to generated wrangler bindings (#908)#920
blue-rigel wants to merge 1 commit into
nuxt-hub:mainfrom
blue-rigel:fix/blob-r2-jurisdiction-wrangler

Conversation

@blue-rigel

Copy link
Copy Markdown

Summary

Fixes #908 by passing hub.blob.jurisdiction through to the auto-generated Cloudflare R2 wrangler binding.

Jurisdictional R2 buckets (e.g. EU) require jurisdiction on the r2_buckets entry. NuxtHub previously only mapped binding and bucket_name, so those buckets could not be configured via hub.blob alone.

Example

export default defineNuxtConfig({
  hub: {
    blob: {
      driver: 'cloudflare-r2',
      bucketName: 'my-eu-bucket',
      jurisdiction: 'eu'
    }
  }
})

Generates:

{
  "r2_buckets": [
    {
      "binding": "BLOB",
      "bucket_name": "my-eu-bucket",
      "jurisdiction": "eu"
    }
  ]
}

When jurisdiction is omitted, the binding is unchanged (no extra field).

Changes

  • Pass optional jurisdiction in src/blob/setup.ts when generating the R2 wrangler binding
  • Add jurisdiction?: string to CloudflareR2BlobConfig and exclude it from runtime driver options
  • Document the option in blob and deploy docs
  • Tests: omit when unset; include when set (eu)

Test plan

  • pnpm test test/wrangler.test.ts test/wrangler-jurisdiction.test.ts
  • Configure hub.blob with jurisdiction: 'eu' and confirm .output/server/wrangler.json (or nitro wrangler config) includes it
  • Configure without jurisdiction and confirm the field is absent

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@blue-rigel is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@blue-rigel
blue-rigel force-pushed the fix/blob-r2-jurisdiction-wrangler branch from 7720036 to 728c75d Compare August 12, 2026 06:43
@blue-rigel
blue-rigel force-pushed the fix/blob-r2-jurisdiction-wrangler branch from 728c75d to cf5a5e9 Compare August 12, 2026 06:45
@blue-rigel blue-rigel changed the title fix: pass R2 jurisdiction to generated wrangler bindings (#908) fix(blob): pass R2 jurisdiction to generated wrangler bindings (#908) Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare R2 "jurisdiction" is not included in generated Wrangler config for NuxtHub blob storage

1 participant