Url remapping / parent path caching

I want to point cdn.mysite.com/contact/1.json cdn.mysite.com/contact/2.json cdn.mysite.com/contact/3.json .... All to the same file. How can I do that with r2?
6 Replies
Chaika
Chaika3mo ago
You could use a Transform Rule -> Rewrite URL
No description
Chaika
Chaika3mo ago
not the most scalable solution but R2 doesn't support internal shortcuts/links or anything
dwayn
dwayn3mo ago
@Chaika why is it not scalable btw
Chaika
Chaika3mo ago
you'd have to manually add extra paths that you want to point at the same file, and you are limited in the amount of rewrite urls per plan, so you could only have so many
dwayn
dwayn3mo ago
okay does this use workers to do it
Chaika
Chaika3mo ago
You could use Workers to do it yea, and hardcode a ton of links into the worker or use some external db (at the cost of being slower)