application/font-woff2 is still in discussion but works in main three browsers
This is needed for ExtJS6, which includes some woff2 fonts

ttf font mime type is taken from the official IANA assignment, and works as
well in main three browsers
---
 PVE/HTTPServer.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PVE/HTTPServer.pm b/PVE/HTTPServer.pm
index 927abc0..d446260 100755
--- a/PVE/HTTPServer.pm
+++ b/PVE/HTTPServer.pm
@@ -364,8 +364,11 @@ sub send_file_start {
            } elsif ($filename =~ m/\.woff$/) {
                $ct = 'application/font-woff';
                $nocomp = 1;
+           } elsif ($filename =~ m/\.woff2$/) {
+               $ct = 'application/font-woff2';
+               $nocomp = 1;
            } elsif ($filename =~ m/\.ttf$/) {
-               $ct = 'application/x-font-ttf';
+               $ct = 'application/font-snft';
                $nocomp = 1;
            } else {
                die "unable to detect content type";
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to