Restrict https access to `storage.mydomain.com` serving R2 objects using cloudflare one?
✅Solved🛡️Zero Trust
I recently set up
mydomain.com
mydomain.com
using R2 to serve some public web pages. I would like to add a subdomain
storage.mydomain.com
storage.mydomain.com
and have that subdomain require some sort of authentication to serve a different R2 bucket.
This is for a single user for personal use using the free plans. I'd like to take advantage of the free egress and avoid S3 api calls.
I see cloudflare one has various access tokens, rules, etc. that can be configured. I'd like to grant myself an authentication token that lasts forever and pass that token in the request headers. I'd like to have the subdomain reject any requests that don't have a valid authentication token.
I am open to other ways, if the above is nonsense.