Allow Requests to be Mirrored to different backends
Add a feature which allows traffic to be mirrored to additional backends. This is useful for testing how requests will behave on different "test" backends. See https://nginx.org/en/docs/http/ngx_http_mirror_module.html
This commit is contained in:
parent
25a293ffcf
commit
386486e969
9 changed files with 264 additions and 1 deletions
|
|
@ -999,6 +999,11 @@ stream {
|
|||
{{ opentracingPropagateContext $location }};
|
||||
{{ end }}
|
||||
|
||||
{{ if $location.Mirror.URI }}
|
||||
mirror {{ $location.Mirror.URI }};
|
||||
mirror_request_body {{ $location.Mirror.RequestBody }};
|
||||
{{ end }}
|
||||
|
||||
rewrite_by_lua_block {
|
||||
lua_ingress.rewrite({{ locationConfigForLua $location $server $all }})
|
||||
balancer.rewrite()
|
||||
|
|
@ -1091,7 +1096,6 @@ stream {
|
|||
}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if not $location.Logs.Access }}
|
||||
access_log off;
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue