How can I detect requests from the Fetch API in PHP? I am currently using the approach below to detect an AJAX request:
$context['isAJAX'] = (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
Ideally I could detect Fetch requests in a similar manner. Does anyone have any techniques to accomplish this?