Skip to content

Commit

Permalink
Set Host header when sending URL check request through axios
Browse files Browse the repository at this point in the history
  • Loading branch information
younglim authored Jan 3, 2024
1 parent 452203f commit 7463aba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion constants/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ const requestToUrl = async (url, isNewCustomFlow) => {
const res = {};
await axios
.get(url, {
headers: { 'User-Agent': devices['Desktop Chrome HiDPI'].userAgent },
headers: {
'User-Agent': devices['Desktop Chrome HiDPI'].userAgent,
'Host': new URL(url).host
},
httpsAgent,
timeout: 2000,
})
Expand Down

0 comments on commit 7463aba

Please sign in to comment.