14 lines
393 B
C#
14 lines
393 B
C#
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace JobTrackerApi.Services;
|
|
|
|
public static class RateLimitPartitionKeys
|
|
{
|
|
public static string PublicPdf(HttpContext context)
|
|
{
|
|
var client = context.Connection.RemoteIpAddress?.ToString() ?? "unknown";
|
|
var slug = context.Request.RouteValues["slug"]?.ToString() ?? "unknown";
|
|
return $"public-pdf:{client}:{slug}";
|
|
}
|
|
}
|