Open
Description
I'm trying to combine the "dynamic_mock" and "proxy" resources. My objective is to route the requests wherever the HOST header says.
e.g.
request:
method: GET
path: /example
dynamic_response:
engine: lua
script: |-
require "math"
return {
proxy = {
host = ..request.headers.host,
follow_redirects = true
}
}
or
request:
method: GET
path: /example
dynamic_response:
engine: go_template_yaml
script: |
proxy:
host: {{.Request.Headers.Get "Host"}}
follow_redirect: true
neither of this seem to work (the response is actually 200 but empty).
Maybe I should note that hardcoding the host
part doesn't seem to work either.
Is this a supported use case?