Move configuration and revert logout changes

This commit is contained in:
FeTetra 2025-05-25 23:53:41 -04:00
commit 63b61d831c
3 changed files with 12 additions and 9 deletions

View file

@ -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)