Skip to content
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
  • Loading branch information
francislavoie and mholt committed May 2, 2021
commit 677ec82898c40ed32b623af44e017d798d406d22
4 changes: 2 additions & 2 deletions modules/caddyhttp/reverseproxy/caddyfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (h *Handler) ParseCaddyfileReverseProxy(helper httpcaddyfile.Helper) error

// collect the response matchers defined as subdirectives prefixed with "@"
// for use with "handle_response" blocks
responseMatchers := map[string]caddyhttp.ResponseMatcher{}
responseMatchers := make(map[string]caddyhttp.ResponseMatcher)

// TODO: the logic in this function is kind of sensitive, we need
// to write tests before making any more changes to it
Expand Down Expand Up @@ -1008,7 +1008,7 @@ func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
//
// @name [header <field> [<value>]] | [status <code...>]
//
func (h *Handler) parseNamedResponseMatcher(d *caddyfile.Dispenser, matchers map[string]caddyhttp.ResponseMatcher) error {
func (Handler) parseNamedResponseMatcher(d *caddyfile.Dispenser, matchers map[string]caddyhttp.ResponseMatcher) error {
for d.Next() {
definitionName := d.Val()

Expand Down