From 594331d4325848c1a9aa05ce0c43376c15645b5d Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sat, 21 Dec 2019 10:07:13 +0100 Subject: [PATCH] Add font mimetypes Also remove the closing php tag, emply lines after the tag get sent out, so we added a 0x0a byte to every file we were serving which led to various problems with some file types --- var/www/pages/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/var/www/pages/index.php b/var/www/pages/index.php index 0cef4e0..f074b63 100644 --- a/var/www/pages/index.php +++ b/var/www/pages/index.php @@ -77,7 +77,10 @@ $mime_types = array( "js" => "application/javascript", "html" => "text/html", "css" => "text/css", - "ico" => "image/x-icon" + "ico" => "image/x-icon", + "woff" => "font/woff", + "woff2" => "font/woff2", + "ttf" => "font/ttf" ); $ext = pathinfo($file_url, PATHINFO_EXTENSION); @@ -93,6 +96,3 @@ header("Content-Type: " . $mime_type); ## If we could directly implode+echo raw output from above, we wouldn't need to execute command twice: passthru($command); - -?> -