#INFO=name=SilverStripe
# Defend against SS-2015-013 -- http://www.silverstripe.org/software/download/security-releases/ss-2015-013
if ($http_x_forwarded_host) {
    return 400;
}

try_files $uri ${template_location}index.php?$query_string;

error_page 404 /assets/error-404.html;
error_page 500 /assets/error-500.html;

# See caveats
error_page 502 /assets/error-500.html;
error_page 503 /assets/error-500.html;

location ~ /assets/ {
    sendfile on;
    try_files $uri =404;
}
