Documentation
¶
Index ¶
Constants ¶
View Source
const ID = "static"
ID contains default service name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Dir contains name of directory to control access to.
Dir string
// Forbid specifies list of file extensions which are forbidden for access.
// Example: .php, .exe, .bat, .htaccess and etc.
Forbid []string
// Always specifies list of extensions which must always be served by static
// service, even if file not found.
Always []string
}
Config describes file location and controls access to them.
func (*Config) AlwaysForbid ¶ added in v1.6.5
AlwaysForbid must return true if file extension is not allowed for the upload.
func (*Config) AlwaysServe ¶ added in v1.6.5
AlwaysServe must indicate that file is expected to be served by static service.
Click to show internal directories.
Click to hide internal directories.