feat: always set auth cookie (#8213)
* feat: always set auth cookie Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com> * feat: Add annotation to always set auth cookie * Add annotation * Add global configmap key * Provide unit tests and e2e tests * Fix e2e documentation autogen script Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com> * Regenerate e2e tests Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
parent
93af9f726a
commit
2c27e66cc7
13 changed files with 501 additions and 537 deletions
|
|
@ -778,7 +778,7 @@ stream {
|
|||
access_log {{ or $cfg.StreamAccessLogPath $cfg.AccessLogPath }} log_stream {{ $cfg.AccessLogParams }};
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
||||
error_log {{ $cfg.ErrorLogPath }} {{ $cfg.ErrorLogLevel }};
|
||||
{{ if $cfg.EnableRealIp }}
|
||||
{{ range $trusted_ip := $cfg.ProxyRealIPCIDR }}
|
||||
|
|
@ -1292,7 +1292,11 @@ stream {
|
|||
{{ else }}
|
||||
auth_request {{ $authPath }};
|
||||
auth_request_set $auth_cookie $upstream_http_set_cookie;
|
||||
{{ if $externalAuth.AlwaysSetCookie }}
|
||||
add_header Set-Cookie $auth_cookie always;
|
||||
{{ else }}
|
||||
add_header Set-Cookie $auth_cookie;
|
||||
{{ end }}
|
||||
{{- range $line := buildAuthResponseHeaders $proxySetHeader $externalAuth.ResponseHeaders false }}
|
||||
{{ $line }}
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue