httpcaddyfile: Rename 'headers' directive to 'header'

This commit is contained in:
Matthew Holt 2020-01-22 09:33:53 -07:00
parent 9a1370c2c8
commit 2105d59936
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
2 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ var directiveOrder = []string{
"try_files",
"basicauth",
"headers",
"header",
"request_header",
"encode",
"templates",

View file

@ -23,14 +23,14 @@ import (
)
func init() {
httpcaddyfile.RegisterHandlerDirective("headers", parseCaddyfile)
httpcaddyfile.RegisterHandlerDirective("header", parseCaddyfile)
httpcaddyfile.RegisterHandlerDirective("request_header", parseReqHdrCaddyfile)
}
// parseCaddyfile sets up the handler for response headers from
// Caddyfile tokens. Syntax:
//
// headers [<matcher>] [[+|-]<field> [<value|regexp>] [<replacement>]] {
// header [<matcher>] [[+|-]<field> [<value|regexp>] [<replacement>]] {
// [+]<field> [<value|regexp> [<replacement>]]
// -<field>
// }