Handle request_id variable correctly in auth requests (#9219)
* Handle $request_id variable correctly in auth requests * Make share_all_vars configurable * Fix test name
This commit is contained in:
parent
e8b8778f74
commit
5d8185c9d7
5 changed files with 96 additions and 26 deletions
|
|
@ -1334,7 +1334,7 @@ stream {
|
|||
# `auth_request` module does not support HTTP keepalives in upstream block:
|
||||
# https://trac.nginx.org/nginx/ticket/1579
|
||||
access_by_lua_block {
|
||||
local res = ngx.location.capture('{{ $authPath }}', { method = ngx.HTTP_GET, body = '' })
|
||||
local res = ngx.location.capture('{{ $authPath }}', { method = ngx.HTTP_GET, body = '', share_all_vars = {{ $externalAuth.KeepaliveShareVars }} })
|
||||
if res.status == ngx.HTTP_OK then
|
||||
ngx.var.auth_cookie = res.header['Set-Cookie']
|
||||
{{- range $line := buildAuthUpstreamLuaHeaders $externalAuth.ResponseHeaders }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue