Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Serve static files on multiple hosts #282

Closed
inktrap opened this issue Apr 6, 2021 · 1 comment
Closed

Serve static files on multiple hosts #282

inktrap opened this issue Apr 6, 2021 · 1 comment

Comments

@inktrap
Copy link

inktrap commented Apr 6, 2021

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 ?

@adamchainz
Copy link
Collaborator

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants