Files
ClubPenguinServer/MareSynchronosServer/MareSynchronosStaticFilesServer/Controllers/ControllerBase.cs
rootdarkarchon 989046da13 add geoip service for file shard matching
fix bug

more logging

fix logging wtf is going on even

handle lists in config log output

do not set "*" as default continent

do not rely on "*" being present in configuration when picking file shard
2024-08-27 14:11:23 +00:00

18 lines
596 B
C#

using MareSynchronosShared.Utils;
using Microsoft.AspNetCore.Mvc;
namespace MareSynchronosStaticFilesServer.Controllers;
public class ControllerBase : Controller
{
protected ILogger _logger;
public ControllerBase(ILogger logger)
{
_logger = logger;
}
protected string MareUser => HttpContext.User.Claims.First(f => string.Equals(f.Type, MareClaimTypes.Uid, StringComparison.Ordinal)).Value;
protected string Continent => HttpContext.User.Claims.FirstOrDefault(f => string.Equals(f.Type, MareClaimTypes.Continent, StringComparison.Ordinal))?.Value ?? "*";
}