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

Vimexx hosting compatibility #2803

Open
4 tasks
piotrbak opened this issue Jun 22, 2020 · 9 comments
Open
4 tasks

Vimexx hosting compatibility #2803

piotrbak opened this issue Jun 22, 2020 · 9 comments
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting module: cache

Comments

@piotrbak
Copy link
Contributor

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)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@GeekPress
Copy link
Contributor

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

@GeekPress GeekPress added 3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting waiting for feedback module: cache labels Jun 24, 2020
@webtrainingwheels
Copy link

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

@GeekPress
Copy link
Contributor

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

Thanks 🙏

@vmanthos
Copy link
Contributor

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

@mifrero
Copy link

mifrero commented Jul 20, 2020

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

@webtrainingwheels
Copy link

@DahmaniAdame
Copy link
Contributor

@vmanthos
Copy link
Contributor

vmanthos commented Jun 7, 2021

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:

  • setting the $scheme to HTTPS:
add_filter( 'rocket_varnish_http_purge_scheme', function( $scheme ){
	$scheme = 'https';
	return $scheme;
});
  • replacing the IP of the $purge_url with Varnish's TLD:
add_filter( 'rocket_varnish_purge_url', function( $purge_url ) {
	$purge_url = str_replace( '185.104.28.118', 'varnish3.zxcs.nl', $purge_url);
	return $purge_url;
});

@DahmaniAdame
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting module: cache
Projects
None yet
Development

No branches or pull requests

6 participants