Skip to content
Snippets Groups Projects
Commit 2a09e1c6 authored by jurgenhaas's avatar jurgenhaas
Browse files

Merge branch 'master' into 'master'

Simplified approach with Varnish 4 method

See merge request ansible-roles/varnish!1
parents 5b9ae553 2bfad4a5
No related branches found
No related tags found
1 merge request!1Simplified approach with Varnish 4 method
......@@ -411,36 +411,9 @@ sub vcl_synth {
return (deliver);
}
return (deliver);
}
sub vcl_fini {
# Called when VCL is discarded only after all requests have exited the VCL.
# Typically used to clean up VMODs.
return (ok);
}
sub vcl_error {
declare local var.maintenance_title STRING;
declare local var.maintenance_headline STRING;
declare local var.maintenance_text STRING;
set obj.http.Content-Type = "text/html; charset=utf-8";
set obj.http.Retry-After = "5";
set var.en.maintenance_title = "Site Maintenance";
set var.en.maintenance_headline = "We’ll be back soon!";
set var.en.maintenance_text = "Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!";
set var.de.maintenance_title = "Wartung";
set var.de.maintenance_headline = "Wir sind bald zurück!";
set var.de.maintenance_text = "Wir führen derzeit einige Wartungsarbeiten durch und entschuldigen uns für die Unannehmlichkeiten. Wir sind bald wieder online!";
synthetic {"
synthetic({"
<!doctype html>
<title>"} + var.en.maintenance_title + " | " + var.de.maintenance_title + {"</title>
<title>Site Maintenance | Wartung</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
......@@ -452,19 +425,28 @@ sub vcl_error {
<body>
<article>
<h1>"} + var.en.maintenance_headline + {"</h1>
<h1>We&rsquo;ll be back soon!</h1>
<div>
<p>"} + var.en.maintenance_text + {"</p>
<p>Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!</p>
</div>
</article>
<article>
<h1>"} + var.de.maintenance_headline + {"</h1>
<h1>Wir sind bald zur&uuml;ck!</h1>
<div>
<p>"} + var.de.maintenance_text + {"</p>
<p>Wir führen derzeit einige Wartungsarbeiten durch und entschuldigen uns für die Unannehmlichkeiten. Wir sind bald wieder online!</p>
</div>
</article>
</body>
"};
"});
return (deliver);
}
sub vcl_fini {
# Called when VCL is discarded only after all requests have exited the VCL.
# Typically used to clean up VMODs.
return (ok);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment