Improve baseUrl function.
This commit is contained in:
parent
ef9833f4a3
commit
a30a70964c
1 changed files with 1 additions and 4 deletions
|
@ -34,8 +34,5 @@ getUrl.noAuth = function getUrlNoAuth(config, app) {
|
||||||
};
|
};
|
||||||
|
|
||||||
getUrl.baseUrl = function getBaseUrl(config) {
|
getUrl.baseUrl = function getBaseUrl(config) {
|
||||||
config = _.pick(config, function (val, param) {
|
return url.format(_.pick(config, 'protocol', 'hostname', 'port'));
|
||||||
return param !== 'auth' & param !== 'pathname' & param !== 'hash';
|
|
||||||
});
|
|
||||||
return url.format(config);
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue