diff --git a/server/server.ts b/server/server.ts index 0eab6cbc..76636cb9 100644 --- a/server/server.ts +++ b/server/server.ts @@ -132,14 +132,14 @@ export default async function ( return res.sendFile(path.join(packagePath, fileName)); }); - let server: import("http").Server | import("https").Server | null = null; - if (Config.values.public && (Config.values.ldap || {}).enable) { log.warn( "Server is public and set to use LDAP. Set to private mode if trying to use LDAP authentication." ); } + let server: import("http").Server | import("https").Server; + if (!Config.values.https.enable) { const createServer = (await import("http")).createServer; server = createServer(app);