File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
"html"
11
11
"html/template"
12
12
"log"
13
- "maps"
14
13
"net/http"
15
14
"net/url"
16
15
"os"
@@ -589,8 +588,11 @@ func NewTemplate(text string) *template.Template {
589
588
// The purpose of environment variables is to allow a easier way to set a configurable but then fixed value for a claim
590
589
// requirement in the configuration file (as rewriting the configuration file is harder than setting environment variables).
591
590
func (plugin * JWTPlugin ) NewTemplateVariables (request * http.Request ) * TemplateVariables {
591
+ // copy the environment variables
592
592
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
+ }
594
596
595
597
variables ["Method" ] = request .Method
596
598
variables ["Host" ] = request .Host
You can’t perform that action at this time.
0 commit comments