keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

fix HTTPS scheme prefix detection for nginx/php-fpm servers #109

Closed centminmod closed 4 years ago

centminmod commented 4 years ago

On nginx/php-fpm systems the check for HTTPS might report incorrectly as $_SERVER['HTTPS'] isn't empty on nginx/php-fpm but maybe set to a value of = off as per #108. This fixes the 2 instances of the check with a check for $_SERVER['HTTPS'] !== 'off' which would still apply on Apache systems' PHP if empty

coreykn commented 4 years ago

In our case the @change tag only references last touched (excluding some format updates). With the changes you've made only the advanced-cache.php and Cache_Enabler_Disk::_file_scheme() need to be updated.

centminmod commented 4 years ago

Made most of the changes but for the life of me, Sourcetree windows app's git interactive rebase /squash isn't squashing my 2 commits.

centminmod commented 4 years ago

Yay finally figured it out squashed all 3 commits. SourceTree app doesn't enable git push force by default so pushes fail

coreykn commented 4 years ago

Thank you @centminmod! Your contribution is much appreciated.