Thanks for your answer and apologies for the long delay.
How would the $http_host ever be empty? If I make a request without it I
receive a 400 Bad Request as the HTTP spec defines it. Does Nginx still
forward the request to the upstream server and populate a cache entry?
Additionally, if I make
github.com/benzimmer/a4ee7b43ae4ade24a570301dfd0c12c2
This seems to be working fine for the most part, but every now and then we
see the described behaviour without being able to consistently reproduce
it.
If anyone has any clue why this might be happening, we'd be very grateful.
If you need