Merge pull request #3450 from watilde/fixes-3179
Use `localhost` instead of `::` for local
This commit is contained in:
commit
f85551b715
|
@ -632,8 +632,7 @@ app.listen = function(cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!self.get('url')) {
|
if (!self.get('url')) {
|
||||||
if (process.platform === 'win32' && listeningOnAll) {
|
if (listeningOnAll) {
|
||||||
// Windows browsers don't support `0.0.0.0` host in the URL
|
|
||||||
// We are replacing it with localhost to build a URL
|
// We are replacing it with localhost to build a URL
|
||||||
// that can be copied and pasted into the browser.
|
// that can be copied and pasted into the browser.
|
||||||
host = 'localhost';
|
host = 'localhost';
|
||||||
|
|
|
@ -839,8 +839,7 @@ describe('app', function() {
|
||||||
app.set('host', undefined);
|
app.set('host', undefined);
|
||||||
|
|
||||||
app.listen(function() {
|
app.listen(function() {
|
||||||
var host = process.platform === 'win32' ? 'localhost' : app.get('host');
|
var expectedUrl = 'http://localhost:' + app.get('port') + '/';
|
||||||
var expectedUrl = 'http://' + host + ':' + app.get('port') + '/';
|
|
||||||
expect(app.get('url'), 'url').to.equal(expectedUrl);
|
expect(app.get('url'), 'url').to.equal(expectedUrl);
|
||||||
|
|
||||||
done();
|
done();
|
||||||
|
|
Loading…
Reference in New Issue