Separate out address used by backend to assist with users who have locked down local machines and cannot connect to a local http server
Remove unsed ip/port property assignment on server start that wasn't used anywhere
This commit is contained in:
parent
8cf8688eba
commit
d60cdb6be2
@ -1,6 +1,8 @@
|
||||
{
|
||||
"ip": "127.0.0.1",
|
||||
"port": 6969,
|
||||
"backendIp": "127.0.0.1",
|
||||
"backendPort": 6969,
|
||||
"webSocketPingDelayMs": 90000,
|
||||
"logRequests": true,
|
||||
"serverImagePathOverride": {}
|
||||
|
@ -32,12 +32,12 @@ export class HttpServerHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine ip and port into url
|
||||
* Combine ip and port into address
|
||||
* @returns url
|
||||
*/
|
||||
public buildUrl(): string
|
||||
{
|
||||
return `${this.httpConfig.ip}:${this.httpConfig.port}`;
|
||||
return `${this.httpConfig.backendIp}:${this.httpConfig.backendPort}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,10 +2,14 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
|
||||
export interface IHttpConfig extends IBaseConfig
|
||||
{
|
||||
webSocketPingDelayMs: number;
|
||||
kind: "aki-http";
|
||||
/** Address used by webserver */
|
||||
ip: string;
|
||||
port: number;
|
||||
/** Address used by game client to connect to */
|
||||
backendIp: string;
|
||||
backendPort: string;
|
||||
webSocketPingDelayMs: number;
|
||||
logRequests: boolean;
|
||||
/** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */
|
||||
serverImagePathOverride: Record<string, string>;
|
||||
|
@ -45,9 +45,6 @@ export class HttpServer
|
||||
this.handleRequest(req, res);
|
||||
});
|
||||
|
||||
this.databaseServer.getTables().server.ip = this.httpConfig.ip;
|
||||
this.databaseServer.getTables().server.port = this.httpConfig.port;
|
||||
|
||||
/* Config server to listen on a port */
|
||||
httpServer.listen(this.httpConfig.port, this.httpConfig.ip, () =>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user