mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-28 06:40:01 +08:00
Export types and fields necessary to build configs (for config adapters)
Also flag most fields with 'omitempty' for JSON marshaling
This commit is contained in:
@ -27,14 +27,14 @@ func init() {
|
||||
|
||||
// FileServer implements a static file server responder for Caddy.
|
||||
type FileServer struct {
|
||||
Root string `json:"root"` // default is current directory
|
||||
Hide []string `json:"hide"`
|
||||
IndexNames []string `json:"index_names"`
|
||||
Files []string `json:"files"` // all relative to the root; default is request URI path
|
||||
SelectionPolicy string `json:"selection_policy"`
|
||||
Rehandle bool `json:"rehandle"` // issue a rehandle (internal redirect) if request is rewritten
|
||||
Fallback caddyhttp.RouteList `json:"fallback"`
|
||||
Browse *Browse `json:"browse"`
|
||||
Root string `json:"root,omitempty"` // default is current directory
|
||||
Hide []string `json:"hide,omitempty"`
|
||||
IndexNames []string `json:"index_names,omitempty"`
|
||||
Files []string `json:"files,omitempty"` // all relative to the root; default is request URI path
|
||||
SelectionPolicy string `json:"selection_policy,omitempty"`
|
||||
Rehandle bool `json:"rehandle,omitempty"` // issue a rehandle (internal redirect) if request is rewritten
|
||||
Fallback caddyhttp.RouteList `json:"fallback,omitempty"`
|
||||
Browse *Browse `json:"browse,omitempty"`
|
||||
// TODO: Etag
|
||||
// TODO: Content negotiation
|
||||
}
|
||||
|
Reference in New Issue
Block a user