add debug http logging

This commit is contained in:
Alan Moon 2024-12-29 14:50:32 -08:00
parent 7376ab4e36
commit 16cbab3652
5 changed files with 15 additions and 11 deletions

2
.gitignore vendored
View File

@ -11,4 +11,4 @@ src/mods/
src/assets-cache/ src/assets-cache/
src/Properties src/Properties
__pycache__/ __pycache__/
src/assets/conf/WIN/3.31.0/DWADragonsMain.xml src/assets/conf/WIN/3.31.0/DWADragonsMain.xml

View File

@ -62,7 +62,7 @@ public class AuthenticationController : Controller {
if(userBan is not null) { if(userBan is not null) {
if (userBan.BanType != UserBanType.IndefiniteSuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) >= 0) { moderationService.RemoveBanFromUser(user, userBan); userBan.EndsAt = DateTime.UtcNow; } // remove ban if its up and set retreived userban to have an end date of now if (userBan.BanType != UserBanType.IndefiniteSuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) >= 0) { moderationService.RemoveBanFromUser(user, userBan); userBan.EndsAt = DateTime.UtcNow; } // remove ban if its up and set retreived userban to have an end date of now
if (userBan.BanType == UserBanType.IndefiniteSuspension || (userBan.BanType == UserBanType.TemporarySuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) < 0)) { if (userBan.BanType == UserBanType.IndefiniteSuspension || (userBan.BanType == UserBanType.TemporarySuspension && DateTime.Compare(DateTime.UtcNow, userBan.EndsAt!.Value) < 0)) {
if (gameVersion <= ClientVersion.Max_OldJS) return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.ProviderError }); // everything 'OldJS' doesn't have 'UserIsBanned', so we use 'ProviderError' i if (gameVersion <= ClientVersion.Max_OldJS) return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.ProviderError }); // everything 'OldJS' doesn't have 'UserIsBanned', so we use 'ProviderError'. Edit: turns out 'UserIsBanned' just shows an error, so for both errors a user would have to contact a mod for assistance
else return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.UserIsBanned }); else return Ok(new ParentLoginInfo{ Status = MembershipUserStatus.UserIsBanned });
}; };
} }

View File

@ -7,6 +7,7 @@ using sodoff.Services;
using sodoff.Utils; using sodoff.Utils;
using System.Xml; using System.Xml;
using System.Net; using System.Net;
using System.Diagnostics;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
@ -68,4 +69,6 @@ app.UseAuthorization();
app.MapControllers(); app.MapControllers();
if (Debugger.IsAttached) app.UseHttpLogging();
app.Run(); app.Run();

View File

@ -74,7 +74,8 @@
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Information"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*"

View File

@ -52,7 +52,7 @@
<TokenExpiredURL>http://localhost/launch.aspx</TokenExpiredURL> <TokenExpiredURL>http://localhost/launch.aspx</TokenExpiredURL>
<!-- SMARTFOX SERVER CONFIG --> <!-- SMARTFOX SERVER CONFIG -->
<MMOServer>localhost</MMOServer> <MMOServer>localhost</MMOServer>
<MMOServerPort>9933</MMOServerPort> <MMOServerPort>9933</MMOServerPort>
@ -67,13 +67,13 @@
<!-- ASSET SERVER CONFIGURATION --> <!-- ASSET SERVER CONFIGURATION -->
<RootURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/</RootURL> <RootURL>https://media.sodoff.spirtix.com/DWADragonsUnity/WIN/{Version}/Mid/</RootURL>
<ContentDataURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/contentdata</ContentDataURL> <ContentDataURL>https://media.sodoff.spirtix.com/DWADragonsUnity/WIN/{Version}/Mid/contentdata</ContentDataURL>
<DataURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/data</DataURL> <DataURL>https://media.sodoff.spirtix.com/DWADragonsUnity/WIN/{Version}/Mid/data</DataURL>
<SceneURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/scene</SceneURL> <SceneURL>https://media.sodoff.spirtix.com/DWADragonsUnity/WIN/{Version}/Mid/scene</SceneURL>
<SharedDataURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/shareddata</SharedDataURL> <SharedDataURL>https://media.sodoff.spirtix.com/DWADragonsUnity/WIN/{Version}/Mid/shareddata</SharedDataURL>
<SoundURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/sound</SoundURL> <SoundURL>https://media.sodoff.spirtix.com/DWADragonsUnity/WIN/{Version}/Mid/sound</SoundURL>
<MoviesURL>https://sodoff.com/DWADragonsUnity/WIN/{Version}/Mid/movies</MoviesURL> <MoviesURL>https://media.sodoff.spirtix.com/DWADragonsUnity/WIN/{Version}/Mid/movies</MoviesURL>
<LocalRootURL>.</LocalRootURL> <LocalRootURL>.</LocalRootURL>
<LocalContentDataURL>./contentdata</LocalContentDataURL> <LocalContentDataURL>./contentdata</LocalContentDataURL>