summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-11-27 11:51:32 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-11-27 11:51:32 -0700
commitdb4293cb5fce33b467b50ef77698f69a4a066215 (patch)
treed05ec08e4d191667de09064b77629ec9acfab729 /modules/caddyhttp/fileserver
parent6e10586303fd90f0298c8086e754b35dfc3f01ba (diff)
reverse_proxy: Add flush_interval to caddyfile syntax (#1460)
Also add godoc for Caddyfile syntax for file_server
Diffstat (limited to 'modules/caddyhttp/fileserver')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go
index 06540bc..46bc5b7 100644
--- a/modules/caddyhttp/fileserver/caddyfile.go
+++ b/modules/caddyhttp/fileserver/caddyfile.go
@@ -27,6 +27,16 @@ func init() {
httpcaddyfile.RegisterDirective("try_files", parseTryFiles)
}
+// parseCaddyfile parses the file_server directive. It enables the static file
+// server and configures it with this syntax:
+//
+// file_server [<matcher>] [browse] {
+// root <path>
+// hide <files...>
+// index <files...>
+// browse [<template_file>]
+// }
+//
func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
var fsrv FileServer