Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on piefed.social
piefed_help·PieFed helpbyalakey

Pseudo logged out on first visit

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.

View original on piefed.social
7

5 replies

piefed.social

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

@[email protected] you changed something to do with caching recently, do you think this could be related?

2
Shadowreply
lemmy.ca

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

1

Even though this hasn't been merged yet, today the issue stopped occurring.

1

Happened to me as well. I am willing to bet rimu did something with the web server that flushed caches or something.

1

You reached the end

Pseudo logged out on first visit | Spyke