mirror of https://github.com/sundowndev/http.git
fix: use regex to avoid falsely replacing ports starting with 80 (#124)
parent
eb73900b42
commit
e981e62289
|
@ -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', '')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue