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 3768bd9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 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,11 @@ 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 3768bd9

Please sign in to comment.