A
A
alexxzhuravlev2016-08-26 22:07:55
Nginx
alexxzhuravlev, 2016-08-26 22:07:55

How to disable caching for logged in users in nginx?

I set up caching of some pages in nginx and it works well, except for one moment - users started to get cookies from previous logged in users, as a result - they
see not their own pages.
Googled stuff like fastcgi_hide_header "Set-Cookie"; BUT, she extinguishes this header for all answers, as a result it is impossible to log in to the site

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Shatokhin, 2016-08-27
@Sovigod

Ставьте куки только пост запросами. Ну и после установки нас выручит proxy_cache_bypass. А вообще вот статья https://www.nginx.com/blog/nginx-caching-guide/

K
key don, 2016-08-28
@keydon2

Есть вариант проставлять куки яваскриптом

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question