cheeaun / phanpy

A minimalistic opinionated Mastodon web client
https://phanpy.social
MIT License
935 stars 85 forks source link

Avatars (profile pictures) don't load unless I clear cache #556

Open steakscience opened 3 weeks ago

steakscience commented 3 weeks ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to Phanpy
  2. Avatars will not load, reloading normally will not fix this
  3. Reloading and clearing cache (cmd + shift + r) will fix this

Expected behavior Avatars should load on the first try

Screenshots https://github.com/cheeaun/phanpy/assets/2727095/d0b6ca4a-a1fb-4c84-9fb5-aa2f01625fb1

Desktop (please complete the following information):

Eisfunke commented 3 weeks ago

Hey, I'm the owner of the instance (inductive.space). It seems the problem was not on phanpy's site, but rather two separate issues on our site.

I was serving the /system/ subpath without CORS headers (Access-Control-Allow-Origin) headers. 3rd-party avatars are served from that path. If I'm not mistaken, this would mean that phanpy can't load them. I've added Access-Control-Allow-Origin: * now.

Interestingly enough, Mastodon's default nginx config doesn't include those headers as well, so I'd have thought more people would've run into this problem by now?

Also, there seems to be a buggy filter in the EasyList ad blocker list that specifically caused these requests to fail when using instance with certain TLDs, such as .space. See https://github.com/easylist/easylist/issues/19302