Noticed that the proxy request response headers are being thrown away in our 404 block. Note that the proxied request is returning 404. If I try and fetch a header that I know is being returned from the proxy it is undefined.
location @four_o_four {
internal;
more_set_headers "X-Host: $sent_http_x_host";
return 404 '{
"error": {
"status_code": 404,
"status": "Not Found",
"message": "The requested resource does not exist."
}
}';
}
In our block example,x-host is being returned from the proxy response, but not visible in the @four_o_four location block. Any idea why?