Skip to content

Commit

Permalink
fix: use regex to avoid falsely replacing ports starting with 80 (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
azrikahar committed Sep 26, 2020
1 parent eb73900 commit e981e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function httpModule (_moduleOptions) {
}

// Remove port 80 when http
if (options.baseURL.includes('http://')) {
if (/^http:\/\/.*:80(\/|$)/.test(options.baseURL)) {
options.baseURL = options.baseURL.replace(':80', '')
}

Expand Down

0 comments on commit e981e62

Please sign in to comment.