Cloudflare integration with Workers and Access
I’m relatively new to web dev but it seems like I can generally improve many aspects of my project by working through Cloudflare.
Currently my project is a Java App running in a Docker container on a dedicated server. I’m using Cloudflare tunnel to proxy the traffic through a non standard port and the DNS is also managed by CF. I have around 193GB and growing video, audio, documents, and 3D models that reside on the dedi. I’m looking into moving those to R2 storage. Q1: Do I need to cache these files locally on my machine or can they be streamed directly from R2?
Secondly - my researching also put me across workers and access. From what I understand I can use Workers to handle the Google Auth and return a session token for the site but I’m unsure how to approach this or how I’m supposed to trust the session token or if I’m misunderstanding this. I do know that once I can trust the email and account that’s accessing the site - I’m in a better position to limit who has admin dashboard acccess via reauthenticating them via CF Access, since I trust my own authentication about as much as I would a toddler with a primed nuclear launch button.
I’m mostly looking to see if I’m on the right track, while the project has purpose -it’s quite a bit of a learning curve for me as practically all other websites I’ve made have been static.
Thanks
Currently my project is a Java App running in a Docker container on a dedicated server. I’m using Cloudflare tunnel to proxy the traffic through a non standard port and the DNS is also managed by CF. I have around 193GB and growing video, audio, documents, and 3D models that reside on the dedi. I’m looking into moving those to R2 storage. Q1: Do I need to cache these files locally on my machine or can they be streamed directly from R2?
Secondly - my researching also put me across workers and access. From what I understand I can use Workers to handle the Google Auth and return a session token for the site but I’m unsure how to approach this or how I’m supposed to trust the session token or if I’m misunderstanding this. I do know that once I can trust the email and account that’s accessing the site - I’m in a better position to limit who has admin dashboard acccess via reauthenticating them via CF Access, since I trust my own authentication about as much as I would a toddler with a primed nuclear launch button.
I’m mostly looking to see if I’m on the right track, while the project has purpose -it’s quite a bit of a learning curve for me as practically all other websites I’ve made have been static.
Thanks
