mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-07 01:04:03 +09:00
Revert "Allow configuring the listen host (#9924)"
This reverts commit 3dfe3aa9a4
.
This commit is contained in:
@ -78,7 +78,7 @@ export async function masterMain() {
|
||||
await spawnWorkers(config.clusterLimit);
|
||||
}
|
||||
|
||||
bootLogger.succ(`Now listening on ${config.host ? `[${config.host}]:` : ''}${config.port} for ${config.url}`, null, true);
|
||||
bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true);
|
||||
}
|
||||
|
||||
function showEnvironment(): void {
|
||||
|
@ -15,7 +15,6 @@ export type Source = {
|
||||
feedback_url?: string;
|
||||
url: string;
|
||||
port: number;
|
||||
host: string;
|
||||
disableHsts?: boolean;
|
||||
db: {
|
||||
host: string;
|
||||
@ -126,7 +125,6 @@ export function loadConfig() {
|
||||
config.url = url.origin;
|
||||
|
||||
config.port = config.port ?? parseInt(process.env.PORT ?? '', 10);
|
||||
config.host = config.host ?? process.env.HOST;
|
||||
|
||||
mixin.version = meta.version;
|
||||
mixin.host = url.host;
|
||||
|
@ -176,10 +176,10 @@ export class ServerService {
|
||||
fastify.server.on('error', err => {
|
||||
switch ((err as any).code) {
|
||||
case 'EACCES':
|
||||
this.logger.error(`You do not have permission to listen on port ${this.config.port}${this.config.host ? ` of host ${this.config.host}` : ''}`);
|
||||
this.logger.error(`You do not have permission to listen on port ${this.config.port}.`);
|
||||
break;
|
||||
case 'EADDRINUSE':
|
||||
this.logger.error(`Port ${this.config.port}${this.config.host ? ` on ${this.config.host}` : ''} is already in use by another process.`);
|
||||
this.logger.error(`Port ${this.config.port} is already in use by another process.`);
|
||||
break;
|
||||
default:
|
||||
this.logger.error(err);
|
||||
@ -194,6 +194,6 @@ export class ServerService {
|
||||
}
|
||||
});
|
||||
|
||||
fastify.listen({ port: this.config.port, host: this.config.host });
|
||||
fastify.listen({ port: this.config.port, host: '0.0.0.0' });
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user