- curl -> envoy(8000) -> app.go (9000)
- envoy has local reply, when response is 400, change to 550
- config is from official sample
- responses are supposed to be rewriten as 550, but not happening.
go run app.go
# new terminal start envoy, using func-e, but should be the same.
# envoy listening on port 8000.
func-e run -c ./bootstrap.yaml --component-log-level "http:trace"
# curl envoy, which routes back to the app.
curl -Htest-header:exact-match-value localhost:8000/code/400 -v
* Trying 127.0.0.1:8000...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET /code/400 HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.68.0
> Accept: */*
> test-header:exact-match-value
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< date: Thu, 28 Apr 2022 20:22:09 GMT
< content-length: 0
< x-envoy-upstream-service-time: 0
< server: incfly-envoy
<