It would be great to be able to differentiate symptoms in the HTTP proxy and symptoms based on the incoming path. Middleware components should skip if the path does not match the incoming request.
This should allow some extra flexibility when proxying multiple endpoints on a single target (e.g. an Nginx server or API gateway).
Requirements:
HTTP Proxy
Specify zero or more Proxy Rules on the http_proxy symptom. The rules may include the following details:
Matching path, host and method as a regular expression
Specifying proxy target rules (path, host and method as strings)
All options replace existing request details, except for path which is prepended to the existing request path e.g. if path was /baz and request http://foo.com/foo/bar => http://foo.com/baz/foo/bar
If no Proxy Rules are provided, default is to proxy as per current behaviour (all requests to proxy are sent to proxy target)
If one or more Proxy Rules are specified, they will take precedence over a default catch-all proxy (existing behaviour)
Proxy Rules are evaluated in the order they are specified (precedence)
Performance is not a consideration
HTTP Symptom
Specify zero or more Matching Rules on the http_tamperer and http_delay symptoms. The rules may include the following details:
Matching path, host and method as a regular expression
If no Matching Rules are provided, default is to apply symptoms as per current behaviour (all requests to proxy are mucked)
If one or more Matching Rules are specified, unmatched rules do not have any symptom applied
It would be great to be able to differentiate symptoms in the HTTP proxy and symptoms based on the incoming path. Middleware components should skip if the path does not match the incoming request.
This should allow some extra flexibility when proxying multiple endpoints on a single target (e.g. an Nginx server or API gateway).
Requirements:
HTTP Proxy
http_proxy
symptom. The rules may include the following details:/baz
and requesthttp://foo.com/foo/bar
=>http://foo.com/baz/foo/bar
HTTP Symptom
http_tamperer
andhttp_delay
symptoms. The rules may include the following details: