Skip to content

Commit 769eb50

Browse files
committed
revert modernize(mapsloop), which upsets Yaegi
1 parent e304145 commit 769eb50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jwt.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"html"
1111
"html/template"
1212
"log"
13-
"maps"
1413
"net/http"
1514
"net/url"
1615
"os"
@@ -589,8 +588,11 @@ func NewTemplate(text string) *template.Template {
589588
// The purpose of environment variables is to allow a easier way to set a configurable but then fixed value for a claim
590589
// requirement in the configuration file (as rewriting the configuration file is harder than setting environment variables).
591590
func (plugin *JWTPlugin) NewTemplateVariables(request *http.Request) *TemplateVariables {
591+
// copy the environment variables
592592
variables := make(TemplateVariables, len(plugin.environment)+6)
593-
maps.Copy(variables, plugin.environment)
593+
for key, value := range plugin.environment {
594+
variables[key] = value
595+
}
594596

595597
variables["Method"] = request.Method
596598
variables["Host"] = request.Host

0 commit comments

Comments
 (0)