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
You could use a Transform Rule -> Rewrite URL
not the most scalable solution but R2 doesn't support internal shortcuts/links or anything
@Chaika why is it not scalable btw
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
okay
does this use workers to do it
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)