evansd/whitenoise

Serve static files on multiple hosts

inktrap opened this issue · 1 comments

Let's suppose i have a server A for media files like images and gifs and videos.
Now I want to use an image on A (404.png) in the 404 page of my flask app and deploy that to servers B C D and E.

At which places would I deploy whitenoise?
In the flask app that runs on B C D and E? So the css and other assets of the app are served through it?
But if the template still references 404.png on server A directly … doesn't the efficiency of that depend on the caching/settings of A or does it depend on whitenoise since it goes through one of B C D or E?

Maybe related to #270 ?

If I understand correctly, you'd only need whitenoise on server A. Servers B through E could reference your "media domain" that's served by server A.