kylewm / redwind

Flask-based personal website #IndieWeb #OwnYourData
Other
45 stars 5 forks source link

proxy foreign images to get rid of mixed content warning #35

Closed kylewm closed 9 years ago

kylewm commented 9 years ago

I tried doing this myself, but since the download and resize operation blocks one of Flask's precious threads, it didn't scale well. (I'm sure it's workable, but I gave up)

So as of https://github.com/kylewm/redwind/commit/c6b1a6b0bd9eef03899d6dbffb468255ed438ba7 I am delegating to a separate pilbox service running on the same server. pilbox runs on tornado so it doesn't have the same blocking issue, and I set up simple nginx caching on it to help with performance.

thedod commented 9 years ago

Not sure, but maybe a way to weasel out of this could be to put this as a qworker job. Maybe copy a placeholder in the meantime (loading.{png|jpg|...}).