Update client dependencies

This commit is contained in:
Ken-Håvard Lieng 2016-02-04 03:35:50 +01:00
parent dbe9d03352
commit 7108fa572c
19 changed files with 109 additions and 116 deletions

View file

@ -8,6 +8,7 @@ import (
"io/ioutil"
"log"
"net/http"
"path"
"path/filepath"
"strconv"
"strings"
@ -78,12 +79,12 @@ func initFileServer() {
}
for _, font := range fonts {
path := strings.TrimSuffix(font, ".gz")
p := strings.TrimSuffix(font, ".gz")
files = append(files, &File{
Path: filepath.Join("font", path),
Asset: filepath.Join("font", font),
ContentType: contentTypes[filepath.Ext(path)],
Path: path.Join("font", p),
Asset: path.Join("font", font),
ContentType: contentTypes[filepath.Ext(p)],
CacheControl: "max-age=31536000",
Gzip: strings.HasSuffix(font, ".gz"),
})