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
Chaika8mo ago
You could use a Transform Rule -> Rewrite URL
No description
Chaika
Chaika8mo ago
not the most scalable solution but R2 doesn't support internal shortcuts/links or anything
dwayn
dwaynOP8mo ago
@Chaika why is it not scalable btw
Chaika
Chaika8mo 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
dwaynOP8mo ago
okay does this use workers to do it
Chaika
Chaika8mo 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)
Want results from more Discord servers?
Add your server