by Matteo Scaramuccia.
Hi Matt,
since you like a simple HTTP 404 with no payload I missed to give you that option. You can do that in the Moodle way as sampled below:
} else {
send_header_404();
die;
}
HTH,
Matteo