why is the URL of got requests showing as 'unknownhost' in AWS? #2022
-
|
Hi all - i have a weird issue when using the Thanks so much for any ideas/tips! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
the issue is that AWS X-Ray SDK (which CloudWatch Synthetics uses) doesn't properly extract the hostname when got passes a URL object as the first argument to got calls this is an AWS X-Ray SDK limitation, not a got bug. |
Beta Was this translation helpful? Give feedback.
the issue is that AWS X-Ray SDK (which CloudWatch Synthetics uses) doesn't properly extract the hostname when got passes a URL object as the first argument to
http.request().got calls
http.request(url, options)with a URL object as the first arg (line 1227 in source/core/index.ts), but AWS X-Ray's hostname extraction logic expectsoptions.hostnameoroptions.hostto be set in the options object itself.this is an AWS X-Ray SDK limitation, not a got bug.