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