-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Description
Hi, I was trying to improve our tracing to show the correct hostname, we run lambdas under API Gateway with a Cloudfront proxy in front of it, so the host in the header is not the right one, since the right one is in the X-Forwarded-Host
header.
You can allow express to trust the X-Forwarded-Host
header, see: https://expressjs.com/en/guide/behind-proxies.html
This will set the correct host on req.host
, but looks like this is not being used by dd-trace-js[1]. Is there any reason for that?
[1] https://github.com/DataDog/dd-trace-js/blob/master/packages/dd-trace/src/plugins/util/web.js#L415