location = /static/a {
  expires -1;
  add_header Last-Modified "";

  default_type text/plain;
  return 200 '';
}

# 1stline use this URL in their zendesk template
location = /static/gov.uk_logotype_crown.png {
  return 301 /media/5c810ef4ed915d43e50ce260/gov.uk_logotype_crown.png;
}

location /__canary__ {
  default_type application/json;
  add_header cache-control "max-age=0, no-store, no-cache";
  return 200 '{"message": "Tweet tweet"}\n';
}

location /robots.txt {
  expires 1w;
}

location = /static/a {
  expires -1;
  add_header Last-Modified "";

  default_type text/plain;
  return 200 '';
}

# 1stline use this URL in their zendesk template
location = /static/gov.uk_logotype_crown.png {
  absolute_redirect off;
  return 301 /media/5c810ef4ed915d43e50ce260/gov.uk_logotype_crown.png;
}

location /__canary__ {
  default_type application/json;
  add_header cache-control "max-age=0, no-store, no-cache";
  return 200 '{"message": "Tweet tweet"}\n';
}

location /robots.txt {
  expires 1w;
}

Use a relative redirect for the crown logo
Use a relative redirect for the crown logo

By default nginx includes the hostname in the redirect, which in our case is some internal name which doesn't work externally.  Switching off the absolute_redirect directive makes redirects relative:

http://nginx.org/en/docs/http/ngx_http_core_module.html#absolute_redirect