feat: allow disabling file detections by reading header (#1175)

This commit is contained in:
WeidiDeng authored and GitHub committed 2021-01-07 11:30:17 +01:00
1 parent 43e0d4a856
commit 6914063853
8 files changed
+104 -85

No files matched your search

+12 -11
View File
@@ -30,17 +30,18 @@ func (s *Settings) GetRules() []rules.Rule {
// Server specific settings.
type Server struct {
Root string `json:"root"`
BaseURL string `json:"baseURL"`
Socket string `json:"socket"`
TLSKey string `json:"tlsKey"`
TLSCert string `json:"tlsCert"`
Port string `json:"port"`
Address string `json:"address"`
Log string `json:"log"`
EnableThumbnails bool `json:"enableThumbnails"`
ResizePreview bool `json:"resizePreview"`
EnableExec bool `json:"enableExec"`
Root string `json:"root"`
BaseURL string `json:"baseURL"`
Socket string `json:"socket"`
TLSKey string `json:"tlsKey"`
TLSCert string `json:"tlsCert"`
Port string `json:"port"`
Address string `json:"address"`
Log string `json:"log"`
EnableThumbnails bool `json:"enableThumbnails"`
ResizePreview bool `json:"resizePreview"`
EnableExec bool `json:"enableExec"`
TypeDetectionByHeader bool `json:"typeDetectionByHeader"`
}
// Clean cleans any variables that might need cleaning.