mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -35,7 +35,8 @@ type ssl struct {
|
||||
}
|
||||
|
||||
type unix struct {
|
||||
Listen string
|
||||
Listen string
|
||||
ProxyHeader string `validate:"required_with=Listen"`
|
||||
}
|
||||
|
||||
// slave 作为slave存储端配置
|
||||
|
||||
@@ -45,7 +45,8 @@ var SSLConfig = &ssl{
|
||||
}
|
||||
|
||||
var UnixConfig = &unix{
|
||||
Listen: "",
|
||||
Listen: "",
|
||||
ProxyHeader: "X-Forwarded-For",
|
||||
}
|
||||
|
||||
var OptionOverwrite = map[string]interface{}{}
|
||||
|
||||
@@ -10,7 +10,9 @@ import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"mime"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -381,7 +383,7 @@ func findContentType(ctx context.Context, fs *filesystem.FileSystem, ls LockSyst
|
||||
//// Rewind file.
|
||||
//_, err = f.Seek(0, os.SEEK_SET)
|
||||
//return ctype, err
|
||||
return "", nil
|
||||
return mime.TypeByExtension(filepath.Ext(name)), nil
|
||||
}
|
||||
|
||||
// ETager is an optional interface for the os.FileInfo objects
|
||||
|
||||
Reference in New Issue
Block a user