Since a day ago the first time I open piefed.social the website appears as if I'm logged out, but just clicking "log in" without going through the actual login process it fixes itself. Is it just me?

Update: any action "fixes" it for the session, not just clicking log in.

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 6 months ago (2 children)

Hmm. The first page you load is being cached, somewhere.

@shadow@lemmy.ca you changed something to do with caching recently, do you think this could be related?

  • source
  • hideshow 2 child comments
  • [–] 1 point 6 months ago (1 child)

    I think your nginx is returning a cached page even though the user is logged in, because nginx caching doesn't factor in request cookies - https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_key

    Default: 	proxy_cache_key $scheme$proxy_host$request_uri;
    

    Once a user does a privileged action now flask sends the first set-cookie header which starts bypassing the nginx cache (flask then does it on every subsequent req too). My varnish is set to not cache if there's request cookies, so that's why I haven't run into this.

    I think this should fix - https://codeberg.org/rimu/pyfedi/pulls/1785

  • source
  • parent
  • hideshow 1 child comment