Skip to content

Commit 510ef2f

Browse files
authored
Update options.js
fix without port bug
1 parent 7bcdb82 commit 510ef2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const setHeaders = (request) => {
99
...request.headers(),
1010
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
1111
"accept-encoding": "gzip, deflate, br",
12-
"host": new URL(request.url()).hostname
12+
"host": new URL(request.url()).host // hostname + port
1313
}
1414
if (request.isNavigationRequest()) {
1515
headers["sec-fetch-mode"] = "navigate";
@@ -36,4 +36,4 @@ const setAgent = (proxy) => {
3636
};
3737
};
3838

39-
module.exports = {setHeaders, setAgent};
39+
module.exports = {setHeaders, setAgent};

0 commit comments

Comments
 (0)