Kirby Plugin return file

I’m trying to return files from a plugin endpoint, but:

    'pattern' => 'shop/download',
    'auth' => false,
    'method' => 'GET',
    'action' => function () {
        $data = $_GET;
        $key = $data['key'];
        $hash = $data['hash'];

        $name = $file->name();
        $extention = $file->extension();
        header('Content-Type: application/octet-stream');
        header("Content-Transfer-Encoding: Binary"); 
        header("Content-disposition: attachment; filename=\"$name.$extention\""); 

        return $file->download();

Doesn’t return any value. While the header it does apply to the response headers.

Please try without those headers

There still seems to be no result, the Content-type does return as text/html; charset=UTF-8