~emersion/kimchi

e1a2275c9308104c33f49788a013969efe78037f — Simon Ser 11 months ago a3c57d7
Rename root directive to file_server
2 files changed, 3 insertions(+), 3 deletions(-)

M directives.go
M kimchi.1.scd
M directives.go => directives.go +2 -2
@@ 103,7 103,7 @@ func parseSite(srv *Server, dir *scfg.Directive) error {
		handler := backend
		for _, child := range dir.Children {
			switch child.Name {
			case "root", "reverse_proxy":
			case "file_server", "reverse_proxy":
				// Backend directive already processed above
			default:
				handler, err = parseMiddleware(child, handler)


@@ 121,7 121,7 @@ func parseSite(srv *Server, dir *scfg.Directive) error {
type parseBackendFunc func(dir *scfg.Directive) (http.Handler, error)

var backends = map[string]parseBackendFunc{
	"root": func(dir *scfg.Directive) (http.Handler, error) {
	"file_server": func(dir *scfg.Directive) (http.Handler, error) {
		var dirname string
		if err := dir.ParseParams(&dirname); err != nil {
			return nil, err

M kimchi.1.scd => kimchi.1.scd +1 -1
@@ 67,7 67,7 @@ The following directives are supported:
	*reverse_proxy* <uri>
		Forward incoming requests to another HTTP server.

	*root* <path>
	*file_server* <path>
		Serve static files at the specified path.

	*header* <key> <value> ++