Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created July 20, 2022 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/5ea417ceb78318d5c82251828d18c18a to your computer and use it in GitHub Desktop.
Save lgolubyev/5ea417ceb78318d5c82251828d18c18a to your computer and use it in GitHub Desktop.
new RateLimiterOptions()
{
OnRejected = (context, cancellationToken) =>
{
context.HttpContext.StatusCode = StatusCodes.Status429TooManyRequests;
return new ValueTask();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment