diff options
Diffstat (limited to '_____/http/config.go')
-rw-r--r-- | _____/http/config.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/_____/http/config.go b/_____/http/config.go index 4ea414c1..bd8cec5e 100644 --- a/_____/http/config.go +++ b/_____/http/config.go @@ -7,6 +7,7 @@ import ( "os" "path" "strings" + "github.com/spiral/roadrunner/http" ) // Configures RoadRunner HTTP server. @@ -14,21 +15,23 @@ type Config struct { // serve enables static file serving from desired root directory. ServeStatic bool + Static *http.FsConfig + // Root directory, required when serve set to true. Root string - // TmpDir contains name of temporary directory to store uploaded files passed to underlying PHP process. + // Dir contains name of temporary directory to store uploaded files passed to underlying PHP process. TmpDir string // MaxRequest specified max size for payload body in bytes, set 0 to unlimited. MaxRequest int64 - // ForbidUploads specifies list of file extensions which are forbidden for uploads. + // Forbid specifies list of file extensions which are forbidden for uploads. // Example: .php, .exe, .bat, .htaccess and etc. ForbidUploads []string } -// ForbidUploads must return true if file extension is not allowed for the upload. +// Forbid must return true if file extension is not allowed for the upload. func (cfg Config) Forbidden(filename string) bool { ext := strings.ToLower(path.Ext(filename)) @@ -46,7 +49,7 @@ type serviceConfig struct { Host string Port string MaxRequest string - Static struct { + Static struct { Serve bool Root string } |