Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-03-07 03:31:35 +0300
committerNick Thomas <nick@gitlab.com>2018-03-07 03:41:04 +0300
commit06866d21fb6f6a9258843ef8929e9b26fb648090 (patch)
tree0f8ea29920e38e25112c5463ff3f85177b9d1fbb /app.go
parentc7f4b31bbdc5ca966d63b96e5d9f514bce598c8a (diff)
Use https://github.com/jshttp/mime-db to populate the mimedb
Diffstat (limited to 'app.go')
-rw-r--r--app.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/app.go b/app.go
index afc43466..b2b09060 100644
--- a/app.go
+++ b/app.go
@@ -10,6 +10,7 @@ import (
"sync"
"time"
+ mimedb "github.com/lupine/go-mimedb"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/cors"
@@ -199,6 +200,10 @@ func (a *theApp) Run() {
}
func runApp(config appConfig) {
+ if err := mimedb.LoadTypes(); err != nil {
+ log.Printf("WARNING: Loading extended MIME database failed: %v", err)
+ }
+
a := theApp{appConfig: config}
if config.ArtifactsServer != "" {