Path based Routes similar to AWS Cloudfront, proxy content in R2

For reference there is a similar unanswered thread from October 2020.

I am trying to deploy a Python Django application behind Cloudflare, if all works out then the only thing I should to use outside of Cloudflare is Compute to host the Django application itself (with issues around scaling, when I have to deal with that, which might involve the use of a redis to share sessions etc).

Given that Cloudflare has R2 and D1, I should in theory be able to host the static files and user generated files for the application on R2 and then use D1 as the database backend.

The static files would ideally be mounted on a sub path e.g /static/ which would then be proxied to the object store on R2.

Optionally I would have to investigate a sub domain for the static file to be hosted on and work around any CORS issues (happy to hear from any Django users).

Appreciate any pointers. Thank you for your time.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.