Commit c4107719 authored by Morten Knutsen's avatar Morten Knutsen

Fix lua indexing, it is not zero based...

parent 9f9c1325
Pipeline #1645 passed with stage
in 1 minute and 7 seconds
......@@ -98,7 +98,7 @@ function setFeideHeaders(feide_data)
for attr, values in pairs(feide_data) do
ngx.req.set_header("X-Feide-Attr-" .. attr, values)
if attr == "eduPersonPrincipalName" then
ngx.req.set_header("Remote-User", values[0])
ngx.req.set_header("Remote-User", values[1])
ngx.req.set_header("X-Feide-Attributes", ngx.encode_base64(cjson.encode(feide_data)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment