21 lines
390 B
C#
21 lines
390 B
C#
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Microsoft.AspNetCore.RateLimiting;
|
|
|
|
namespace WebRate2.Pages;
|
|
// <snippet_1>
|
|
[EnableRateLimiting("sliding")]
|
|
public class IndexModel : PageModel
|
|
{
|
|
private readonly ILogger<IndexModel> _logger;
|
|
|
|
public IndexModel(ILogger<IndexModel> logger)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
public void OnGet()
|
|
{
|
|
}
|
|
}
|
|
// </snippet_1>
|