mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-30 00:38:38 +00:00
Move configuration and revert logout changes
This commit is contained in:
parent
b84bf02373
commit
63b61d831c
3 changed files with 12 additions and 9 deletions
|
@ -67,9 +67,12 @@ public class LoginController : ControllerBase
|
|||
|
||||
UserEntity? user;
|
||||
|
||||
if (!PatchworkHelper.UserHasValidPatchworkUserAgent(this.Request.Headers.UserAgent.ToString()))
|
||||
if (ServerConfiguration.Instance.Authentication.RequirePatchworkUserAgent)
|
||||
{
|
||||
return this.Forbid();
|
||||
if (!PatchworkHelper.UserHasValidPatchworkUserAgent(this.Request.Headers.UserAgent.ToString()))
|
||||
{
|
||||
return this.Forbid();
|
||||
}
|
||||
}
|
||||
|
||||
switch (npTicket.Platform)
|
||||
|
|
|
@ -9,5 +9,11 @@ public class AuthenticationConfiguration
|
|||
public bool AllowRPCNSignup { get; set; } = true;
|
||||
|
||||
public bool AllowPSNSignup { get; set; } = true;
|
||||
|
||||
// Require use of Zaprit's "Patchwork" prx plugin's user agent when connecting to the server
|
||||
// Major and minor version minimums can be left alone if patchwork is not required
|
||||
public bool RequirePatchworkUserAgent { get; set; } = false;
|
||||
public int PatchworkMajorVersionMinimum { get; set; } = 0;
|
||||
public int PatchworkMinorVersionMinimum { get; set; } = 0;
|
||||
|
||||
}
|
|
@ -11,7 +11,7 @@ public class ServerConfiguration : ConfigurationBase<ServerConfiguration>
|
|||
// This is so Lighthouse can properly identify outdated configurations and update them with newer settings accordingly.
|
||||
// If you are modifying anything here, this value MUST be incremented.
|
||||
// Thanks for listening~
|
||||
public override int ConfigVersion { get; set; } = 28;
|
||||
public override int ConfigVersion { get; set; } = 29;
|
||||
|
||||
public override string ConfigName { get; set; } = "lighthouse.yml";
|
||||
public string WebsiteListenUrl { get; set; } = "http://localhost:10060";
|
||||
|
@ -31,12 +31,6 @@ public class ServerConfiguration : ConfigurationBase<ServerConfiguration>
|
|||
public bool CheckForUnsafeFiles { get; set; } = true;
|
||||
public bool LogChatFiltering { get; set; } = false;
|
||||
public bool LogChatMessages { get; set; } = false;
|
||||
|
||||
// Require use of Zaprit's "Patchwork" prx plugin's user agent when connecting to the server
|
||||
// Major and minor version minimums can be left alone if patchwork is not required
|
||||
public bool RequirePatchworkUserAgent { get; set; } = false;
|
||||
public int PatchworkMajorVersionMinimum { get; set; } = 0;
|
||||
public int PatchworkMinorVersionMinimum { get; set; } = 0;
|
||||
public AuthenticationConfiguration Authentication { get; set; } = new();
|
||||
public CaptchaConfiguration Captcha { get; set; } = new();
|
||||
public DigestKeyConfiguration DigestKey { get; set; } = new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue