'font/ttf', 'otf' => 'font/otf', 'woff' => 'font/woff', 'woff2' => 'font/woff2', default => 'application/octet-stream', }; header("Content-Type: $mime"); header('Cache-Control: public, max-age=31536000, immutable'); header('Content-Length: ' . filesize($file)); readfile($file);