“ Vary:Cookie”标头实际上对从Varnish投放的网页有什么作用?


9

根据default.settings.php中的文档,我在其他地方也看到过类似的描述, "Without "Vary:Cookie", authenticated users would also be served the anonymous page from the cache."

但是$conf['omit_vary_cookie'] = TRUE;,建议在Drupal 7中与Varnish一起使用,似乎并不能阻止用户从匿名会话切换到经过身份验证的会话。这是Varnish实际不关心的标头吗?

Answers:


15

回答我自己的问题。我发现使用时$conf['omit_vary_cookie'] = TRUE;,以匿名用户身份访问页面并登录的用户将看到页面的缓存版本,直到他们在浏览器上单击“刷新”为止。作为管理员用户我最初没有注意到这是一个微妙的区别。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.