diff options
author | Wolfy-J <[email protected]> | 2018-09-23 15:00:51 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-23 15:00:51 +0300 |
commit | 46c53d51cd8edd4e934c47f49f806758f4ccad63 (patch) | |
tree | 5e04c41ebb1b8eba5713c992c3d4866e8fb959fb /service/http/uploads_config.go | |
parent | 19d88fc879ba403347726138eb532fb85d38168e (diff) |
default configs
Diffstat (limited to 'service/http/uploads_config.go')
-rw-r--r-- | service/http/uploads_config.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/http/uploads_config.go b/service/http/uploads_config.go index e90d9b70..3f655064 100644 --- a/service/http/uploads_config.go +++ b/service/http/uploads_config.go @@ -16,6 +16,12 @@ type UploadsConfig struct { Forbid []string } +// InitDefaults sets missing values to their default values. +func (cfg *UploadsConfig) InitDefaults() error { + cfg.Forbid = []string{".php", ".exe", ".bat"} + return nil +} + // TmpDir returns temporary directory. func (cfg *UploadsConfig) TmpDir() string { if cfg.Dir != "" { |