Nginx fastcgi_cache hide Set-Cookie when serving from cache

Solution 1:

Try to use fastcgi_hide_header:

fastcgi_hide_header "Set-Cookie";

This will hide all cookies when the request hits cache. official docs