Use getAssetFromKV with subdomain

Hi I am trying to use getAssetFromKV with a subdomain. I have it configured in my wrangler.toml
routes = [
{ pattern = "mydomain.app", custom_domain = true },
{ pattern = "*.mydomain.app", zone_name = "mydomain.app" },
]
routes = [
{ pattern = "mydomain.app", custom_domain = true },
{ pattern = "*.mydomain.app", zone_name = "mydomain.app" },
]
Unfortunetely, the default examplesfor getAssetFromKV do not seem to work. I.e. this one https://github.com/cloudflare/workers-sdk/tree/81dfb1746a2b2a17c06f809b2da9f937810ca701/packages/kv-asset-handler#es-modules Is any special setup needed?
GitHub
workers-sdk/packages/kv-asset-handler at 81dfb1746a2b2a17c06f809b2d...
⛅️ Home to Wrangler, the CLI for Cloudflare Workers® - cloudflare/workers-sdk
1 Reply
Bart
BartOP7mo ago
I am getting a 522 error. Omg, I needed to { pattern = ".mydomain.app/", zone_name = "mydomain.app" },
Want results from more Discord servers?
Add your server