From 7c83675e17a9cd21cc708a9106a0c460a2db8762 Mon Sep 17 00:00:00 2001 From: Koala Yeung Date: Tue, 13 Oct 2020 12:19:15 +0800 Subject: [PATCH] authorizer: Replace ResponseRecorder.HeaderMap use * ResponseRecorder.HeaderMap is deprecated and hence is replaced by a ResponseRecorder.Header() call. --- authorizer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorizer.go b/authorizer.go index f05581d..7e73a2d 100644 --- a/authorizer.go +++ b/authorizer.go @@ -134,7 +134,7 @@ func (ar Authorizer) Wrap(inner http.Handler) http.Handler { // no problem from authorizer // pass down variable to the inner handler // and discard the authorizer stdout and stderr - for k, m := range rw.HeaderMap { + for k, m := range rw.Header() { // looking for header with keys "Variable-*" // strip the prefix and pass to the inner header if len(k) > 9 && strings.HasPrefix(strings.ToLower(k), "variable-") {