nginx-helper
nginx-helper copied to clipboard
Purge Entire Cache action uses wrong purge method
The module seems to have 2 purge modes:
The GET PURGE/url
method works fine when saving single posts and whatnot, however, the the "Purge Entire Cache" seem to execute the unlink_recursive
function which of course fails on a shared hosting server due to insufficient permissions.
Allowing shared hosting users to reach and manipulate the global fcgi cache is not an option and would be considered as a security issue.
The PURGE/*
wildcard is supported since the 2.4 that was released in 2016, that would still work with all your nginx examples:
https://github.com/nginx-modules/ngx_cache_purge/releases
@gagan0123
I was disappointed to see this wasn't included in the latest update. I'm also effected by the issue above.
Are there any plans to add the PURGE/* now this it's supported?
https://github.com/nginx-modules/ngx_cache_purge/releases/tag/2.4
I am currently testing fastcgi cache and nginx helper and noticed the same issue. Purging Entire Cache does not work for our isolated users. Since we use the /PURGE/ URL, @akansc 's suggestion would work for us as well
That seems to be an old known issue. https://github.com/rtCamp/nginx-helper/pull/306
Working on this too, pulled other fork
Wrote this 6 years ago, other fork is bringing into nginx helper
https://github.com/JeffCleverley/NginxFastCGICachePurger
The curl functions require 5.5+ and nginx helper is set for 5.4 + compatibility, so im going to take the above fork and add a php guard...
Im also adding socket and other connection option supports.
I have completed work on a fork here:
https://github.com/gridpane/nginx-helper
Settings can be configured by wp-admin or using constants
I have put in a guard to check for PHP version, since the curl option required is only available in 5.5+ and plugin is set to allow older versions...
Pulled in work from my old plugin and the pull above: https://github.com/rtCamp/nginx-helper/pull/306
Going to complete testing on our platform and will make PR.
https://github.com/rtCamp/nginx-helper/pull/344
Thank you, I hope this gets added in soon.
I appreciate it as well @gridpane