The backend listens to all interfaces by default (#1962)
* The backend listens to all interfaces by default Previously, if you did not specify a host, it would only listen to localhost, so it would not accept connections from the network. If you use the default generated app, it is configured to listen to 0.0.0.0 which only listens to IPv4 interfaces. This changes the default behavior, just listen to all interfaces. * Add some comment
This commit is contained in:
@@ -5,7 +5,6 @@ app:
|
||||
backend:
|
||||
baseUrl: http://localhost:7000
|
||||
listen:
|
||||
host: 0.0.0.0
|
||||
port: 7000
|
||||
cors:
|
||||
origin: http://localhost:3000
|
||||
|
||||
@@ -33,7 +33,8 @@ import { ServiceBuilder } from '../types';
|
||||
import { readBaseOptions, readCorsOptions } from './config';
|
||||
|
||||
const DEFAULT_PORT = 7000;
|
||||
const DEFAULT_HOST = 'localhost';
|
||||
// '' is express default, which listens to all interfaces
|
||||
const DEFAULT_HOST = '';
|
||||
|
||||
export class ServiceBuilderImpl implements ServiceBuilder {
|
||||
private port: number | undefined;
|
||||
|
||||
@@ -8,7 +8,6 @@ organization:
|
||||
backend:
|
||||
baseUrl: http://localhost:7000
|
||||
listen:
|
||||
host: 0.0.0.0
|
||||
port: 7000
|
||||
cors:
|
||||
origin: http://localhost:3000
|
||||
|
||||
Reference in New Issue
Block a user