
Build your own CDN on a Raspberry Pi - sdan
https://suryad.com/blog/2020/03/21/build-your-own-cdn/
======
captn3m0
If you'd like to actually join a CDN with your Pi, check
[https://commons.host/](https://commons.host/)

------
throwaway9d0291
This is a really weird setup and it's not "a CDN on a Raspberry Pi", it's a
"CDN with a Raspberry Pi origin".

TL;DR: It uses CloudFlare Workers to add cache and CORS headers to cached
responses.

It's unclear to me why though. Why bother with all this complex setup, code
and extra expense? It takes two lines of NGINX configuration to add the
headers and CloudFlare's regular service supports the caching headers natively
[0] and will proxy through the others you set.

[0]: [https://support.cloudflare.com/hc/en-
us/articles/11500320685...](https://support.cloudflare.com/hc/en-
us/articles/115003206852-Understanding-Origin-Cache-Control)

------
_def
"Utilize Cloudflare’s CDN to serve files"

