X-Forwarded-Host

I’m having the same issue and asked a similar question here Knowing the current public hostname of a Netlify function