rtCamp / nginx-helper

Nginx Helper for WordPress caching, permalinks & efficient file handling in multisite
https://wordpress.org/plugins/nginx-helper/
224 stars 117 forks source link

Cloudflare with Nginx Helper: "cf-edge-cache response header is missing! " #286

Closed bozzmedia closed 1 year ago

bozzmedia commented 1 year ago

Using Cloudflare + nginx helper, the APO mechanism in Cloudflare complains that

"cf-edge-cache response header is missing! Please clear any server cache used via other plugins."

When I clear nginx cache the issue goes away.

Is there a certain configuration step I need to deal with to work with both Cloudflare + nginx?

Thanks!

gagan0123 commented 1 year ago

@bozzmedia

Modifying the nginx config itself is out of the scope of this plugin. The plugin only helps when nginx is correctly configured to handle purge requests. You'll need to modify the nginx config to add new headers. Here's some reference on how to add it in nginx config: https://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header