mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-22 16:46:53 +01:00
Forgot to commit caddyfile.go changes in last commit
This commit is contained in:
parent
c09e86fddc
commit
2ab2d5bf9e
1 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ func init() {
|
||||||
// Either a block can be opened or a single header field can be configured
|
// Either a block can be opened or a single header field can be configured
|
||||||
// in the first line, but not both in the same directive.
|
// in the first line, but not both in the same directive.
|
||||||
func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
|
func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
|
||||||
hdr := new(Headers)
|
hdr := new(Handler)
|
||||||
for h.Next() {
|
for h.Next() {
|
||||||
// first see if headers are in the initial line
|
// first see if headers are in the initial line
|
||||||
var hasArgs bool
|
var hasArgs bool
|
||||||
|
@ -74,7 +74,7 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
|
||||||
// request_header [<matcher>] [[+|-]<field> <value>]
|
// request_header [<matcher>] [[+|-]<field> <value>]
|
||||||
//
|
//
|
||||||
func parseReqHdrCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
|
func parseReqHdrCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
|
||||||
hdr := new(Headers)
|
hdr := new(Handler)
|
||||||
for h.Next() {
|
for h.Next() {
|
||||||
if !h.NextArg() {
|
if !h.NextArg() {
|
||||||
return nil, h.ArgErr()
|
return nil, h.ArgErr()
|
||||||
|
@ -109,7 +109,7 @@ func parseReqHdrCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler,
|
||||||
return hdr, nil
|
return hdr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func processCaddyfileLineRespHdr(hdr *Headers, field, value string) {
|
func processCaddyfileLineRespHdr(hdr *Handler, field, value string) {
|
||||||
if hdr.Response == nil {
|
if hdr.Response == nil {
|
||||||
hdr.Response = &RespHeaderOps{
|
hdr.Response = &RespHeaderOps{
|
||||||
HeaderOps: new(HeaderOps),
|
HeaderOps: new(HeaderOps),
|
||||||
|
|
Loading…
Reference in a new issue