Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP Fastest Cache configuration #9

Open
manyk opened this issue Mar 4, 2018 · 1 comment
Open

WP Fastest Cache configuration #9

manyk opened this issue Mar 4, 2018 · 1 comment

Comments

@manyk
Copy link

manyk commented Mar 4, 2018

You have conflicting settings in the configuration to support WPFC.
Wrong use of Vary header may lead to cache issues especially if CDN is in play.

Please read this post here to understand what I'm talking about:
https://www.fastly.com/blog/best-practices-using-vary-header

@pothi
Copy link
Owner

pothi commented Mar 5, 2018

Hello,

Thanks for creating this issue.

At https://github.com/pothi/wordpress-nginx/blob/master/globals/wpfc.conf#L28 (written 4 years ago), I have mentioned add_header "Vary" "Cookie"; as an optional setting by commenting it out. But, as things change and as more and more sites use it for requests that shouldn't be cached, I found it to okay and important to enable it by default.

My example configuration/s wouldn't fit every use-case. They are published here as a starting point for anyone to tweak further for their specific scenario. At least, I tweak them before deploying it to every site. For example, if someone uses Cloudflare, Varnish or Fastly, they are likely to include the line set_real_ip_from and real_ip_header. Actually, I am thinking of including Cloudflare support by default, as more and more sites start to use Cloudflare. Also, including Cloudflare support doesn't create any issue for sites that don't use Cloudflare. But, when someone wants to use Fastly, they may have to disable Cloudflare support as both conflict with each other.

Please put forth your further thoughts, if any. I am glad to modify configuration/s to fit more and more users.

Thanks again,
Pothi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants