mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 08:57:55 +00:00
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
This commit is contained in:
parent
689ba3a8f9
commit
594331d432
1 changed files with 4 additions and 4 deletions
|
@ -77,7 +77,10 @@ $mime_types = array(
|
||||||
"js" => "application/javascript",
|
"js" => "application/javascript",
|
||||||
"html" => "text/html",
|
"html" => "text/html",
|
||||||
"css" => "text/css",
|
"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);
|
$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:
|
## If we could directly implode+echo raw output from above, we wouldn't need to execute command twice:
|
||||||
passthru($command);
|
passthru($command);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue