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",
|
"ip": "127.0.0.1",
|
||||||
"port": 6969,
|
"port": 6969,
|
||||||
|
"backendIp": "127.0.0.1",
|
||||||
|
"backendPort": 6969,
|
||||||
"webSocketPingDelayMs": 90000,
|
"webSocketPingDelayMs": 90000,
|
||||||
"logRequests": true,
|
"logRequests": true,
|
||||||
"serverImagePathOverride": {}
|
"serverImagePathOverride": {}
|
||||||
|
@ -32,12 +32,12 @@ export class HttpServerHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combine ip and port into url
|
* Combine ip and port into address
|
||||||
* @returns url
|
* @returns url
|
||||||
*/
|
*/
|
||||||
public buildUrl(): string
|
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
|
export interface IHttpConfig extends IBaseConfig
|
||||||
{
|
{
|
||||||
webSocketPingDelayMs: number;
|
|
||||||
kind: "aki-http";
|
kind: "aki-http";
|
||||||
|
/** Address used by webserver */
|
||||||
ip: string;
|
ip: string;
|
||||||
port: number;
|
port: number;
|
||||||
|
/** Address used by game client to connect to */
|
||||||
|
backendIp: string;
|
||||||
|
backendPort: string;
|
||||||
|
webSocketPingDelayMs: number;
|
||||||
logRequests: boolean;
|
logRequests: boolean;
|
||||||
/** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */
|
/** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */
|
||||||
serverImagePathOverride: Record<string, string>;
|
serverImagePathOverride: Record<string, string>;
|
||||||
|
@ -45,9 +45,6 @@ export class HttpServer
|
|||||||
this.handleRequest(req, res);
|
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 */
|
/* Config server to listen on a port */
|
||||||
httpServer.listen(this.httpConfig.port, this.httpConfig.ip, () =>
|
httpServer.listen(this.httpConfig.port, this.httpConfig.ip, () =>
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user