global: add some basic rate limiting

This commit is contained in:
Abdullah Atta
2025-07-15 13:34:31 +05:00
parent 8c267e51f4
commit 34fa43f302
6 changed files with 26 additions and 1 deletions
@@ -25,6 +25,7 @@ using AspNetCore.Identity.Mongo.Model;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.RateLimiting;
using Streetwriters.Common;
using Streetwriters.Common.Enums;
using Streetwriters.Common.Models;
@@ -51,6 +52,7 @@ namespace Streetwriters.Identity.Controllers
[HttpPost]
[AllowAnonymous]
[EnableRateLimiting("strict")]
public async Task<IActionResult> Signup([FromForm] SignupForm form)
{
if (Constants.DISABLE_SIGNUPS)