cirandas.net

ref: master

etc/noosfero/varnish-noosfero.vcl


vcl 4.0;

sub vcl_recv {
  if (req.method == "GET" || req.method == "HEAD") {
    if (req.http.Cookie) {
      # We only care about the "_noosfero_.*" cookies, used by Noosfero
      if (req.http.Cookie !~ "_noosfero_.*" ) {
        # strip all cookies
        unset req.http.Cookie;
      }
    }
  }
}

sub vcl_deliver {
  # Force clients to aways hit the server again for HTML pages
  if (resp.http.Content-Type ~ "^text/html") {
    set resp.http.Cache-Control = "no-cache";
  }
}

sub vcl_backend_error {
    set beresp.http.Content-Type = "text/html; charset=utf-8";

    synthetic({"


  
  
  
  Technical problems
  
  
  
  


  
"}); return(deliver); }