wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
701 stars 218 forks source link

Vimexx hosting compatibility #2803

Open piotrbak opened 4 years ago

piotrbak commented 4 years ago

Vimexx hosting is using Varnish on their servers. In order to purge their cache, we need to add additional headers to our requests: host-ZXCS: X-Purge-ZXCS: true

Current state Right now we can use the following snippet to make the compatibility: http://snippi.com/s/21eii77

Ideal state Make automatic detection and integration with this hosting provider.

Related tickets: https://secure.helpscout.net/conversation/1194833523/172813 https://secure.helpscout.net/conversation/1155460964/162836/

Backlog Grooming (for WP Media dev team use only)

GeekPress commented 4 years ago

@piotrbak Is there a way to know a website is hosed on Vimexx?

webtrainingwheels commented 4 years ago

@GeekPress After speaking with @piotrbak, I've sent them an email about this: https://secure.helpscout.net/conversation/1204722684/175580?folderId=377610

GeekPress commented 4 years ago

@GeekPress After speaking with @piotrbak, I've sent them an email about this: https://secure.helpscout.net/conversation/1204722684/175580?folderId=377610

Thanks 🙏

vmanthos commented 4 years ago

Related ticket of a Vimexx customer: https://secure.helpscout.net/conversation/1214845335/177832/

mifrero commented 4 years ago

Related ticket https://secure.helpscout.net/conversation/1227894272/180833/ The issue is related to to making it work when Cloudflare is enabled.

webtrainingwheels commented 4 years ago

Testing account info here: https://secure.helpscout.net/conversation/1227675409/180792?folderId=377610#thread-3562847380

DahmaniAdame commented 3 years ago

Related ticket - https://secure.helpscout.net/conversation/1377218868/226221

vmanthos commented 3 years ago

Related ticket: https://secure.helpscout.net/conversation/1520157492/265830/

The Vimexx-specific headers were set using:

add_filter('rocket_varnish_purge_headers', 'filter_rocket_varnish_args' );
function filter_rocket_varnish_args( $headers ){
    $headers[ 'X-Purge-ZXCS' ] = 'true';
    $headers[ 'host-ZXCS' ] = $headers['host'];
    return $headers;
}

However, adding Vimexx's IPs using our helper plugin, didn't purge the cache. What did was:

DahmaniAdame commented 3 years ago

Related - https://secure.helpscout.net/conversation/1548745501/273032/