Skip to content

Commit

Permalink
refactor: attach regardless
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 committed Nov 20, 2024
1 parent b9a6f58 commit 6462224
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions lib/interceptor/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,20 +353,13 @@ module.exports = interceptorOpts => {
}

let dispatchOpts = null
if (origin.protocol === 'https:') {
dispatchOpts = {
...origDispatchOpts,
servername: origin.hostname, // For SNI on TLS
origin: newOrigin,
headers: {
host: origin.hostname,
...origDispatchOpts.headers
}
}
} else {
dispatchOpts = {
...origDispatchOpts,
origin: newOrigin
dispatchOpts = {
...origDispatchOpts,
servername: origin.hostname, // For SNI on TLS
origin: newOrigin,
headers: {
host: origin.hostname,
...origDispatchOpts.headers
}
}

Expand Down

0 comments on commit 6462224

Please sign in to comment.