Skip to content
Browse files

Add the domain as 'Host:' header

  • Loading branch information...
1 parent e0c3f4f commit 41d7291399cea08a768e5d37bca1616fd6ba1648 Gunther Konig committed Mar 22, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 Helper/Varnish.php
View
6 Helper/Varnish.php
@@ -74,6 +74,12 @@ public function __construct($domain, array $ips, $port)
*/
public function invalidatePath($path, array $options = array())
{
+ $headers = array(
+ sprintf('Host: %s', $this->domain)
+ );
+
+ $options[CURLOPT_HTTPHEADER] = $headers;
+
//Garanteed to be a purge request
$options[CURLOPT_CUSTOMREQUEST] = 'PURGE';

0 comments on commit 41d7291

Please sign in to comment.
Something went wrong with that request. Please try again.