mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Remove config dependency in lib/authenticate
Restructure lib/authenticate to set the authentication secret at a later point in time via setAuthSecret. This breaks playerManager.
This commit is contained in:
1 parent
8c1c8d07a9
commit
af2471b427
5 files changed
+55
-27
No files matched your search
@@ -36,7 +36,7 @@ const generateSSLcert = require("lib/generateSSLcert");
|
||||
const getFactorioLocale = require("lib/getFactorioLocale");
|
||||
|
||||
// homemade express middleware for token auth
|
||||
const authenticate = require("lib/authenticate")(config);
|
||||
const authenticate = require("lib/authenticate");
|
||||
|
||||
const express = require("express");
|
||||
const compression = require('compression');
|
||||
@@ -921,6 +921,8 @@ async function startServer() {
|
||||
// mod downloads
|
||||
app.use(express.static(masterModFolder));
|
||||
|
||||
authenticate.setAuthSecret(config.masterAuthSecret);
|
||||
|
||||
// Make sure we're actually going to listen on a port
|
||||
let httpPort = args.masterPort || config.masterPort;
|
||||
let httpsPort = args.sslPort || config.sslPort;
|
||||
|
||||
Reference in new issue
Block a user