fix: use regex to avoid falsely replacing ports starting with 80 (#124)

master
Azri Kahar 2020-09-26 18:51:46 +08:00 committed by GitHub
parent eb73900b42
commit e981e62289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ function httpModule (_moduleOptions) {
} }
// Remove port 80 when http // Remove port 80 when http
if (options.baseURL.includes('http://')) { if (/^http:\/\/.*:80(\/|$)/.test(options.baseURL)) {
options.baseURL = options.baseURL.replace(':80', '') options.baseURL = options.baseURL.replace(':80', '')
} }