Skip to content

Commit

Permalink
fix absolute path for jwt key file
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Koch committed Feb 18, 2021
1 parent 3fdfacf commit b3f329b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/runtime/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net"
"net/http"
"net/http/httptest"
"os"
"path"
"path/filepath"
"strconv"
"strings"

Expand Down Expand Up @@ -275,11 +275,12 @@ func configureAccessControls(conf *config.CouperFile, confCtx *hcl.EvalContext)
}
var key []byte
if jwt.KeyFile != "" {
wd, err := os.Getwd()
p, err := filepath.Abs(jwt.KeyFile)
if err != nil {
return nil, err
}
content, err := ioutil.ReadFile(path.Join(wd, jwt.KeyFile))

content, err := ioutil.ReadFile(p)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit b3f329b

Please sign in to comment.