Skip to content

Commit 70777c3

Browse files
authored
Applied suggestions from reviews
1 parent e34a167 commit 70777c3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

aspnetcore/performance/rate-limit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The following steps show how to use the rate limiting middleware in an ASP.NET C
6262

6363
2. Configure rate limiting services.
6464

65-
In the `Program.cs` file, configure the rate limiting services by adding the appropriate rate limiting policies. Policies can either be defined as global or named polices. The following example permits 10 requests per minute:
65+
In the `Program.cs` file, configure the rate limiting services by adding the appropriate rate limiting policies. Policies can either be defined as global or named polices. The following example permits 10 requests per minute by user (identity) or globally:
6666

6767
``` csharp
6868
builder.Services.AddRateLimiter(options =>
@@ -80,7 +80,7 @@ The following steps show how to use the rate limiting middleware in an ASP.NET C
8080
});
8181
```
8282

83-
Named polices need to be explicitly applied to the pages or endpoints. The following example adds a fixed window limiter:
83+
Named polices need to be explicitly applied to the pages or endpoints. The following example adds a fixed window limiter policy named `"fixed"` which we'll add to an endpoint later:
8484

8585
``` csharp
8686
var builder = WebApplication.CreateBuilder(args);
@@ -99,7 +99,7 @@ The following steps show how to use the rate limiting middleware in an ASP.NET C
9999
var app = builder.Build();
100100
```
101101

102-
The global limiter applies to all endpoints automatically when it's configured via [options. GlobalLimiter](/dotnet/api/microsoft.aspnetcore.ratelimiting.ratelimiteroptions.globallimiter), and no endpoint-specific policy is specified.
102+
The global limiter applies to all endpoints automatically when it's configured via [options.GlobalLimiter](/dotnet/api/microsoft.aspnetcore.ratelimiting.ratelimiteroptions.globallimiter).
103103

104104
3. Enable rate limiting middleware
105105

@@ -163,10 +163,10 @@ To set a policy for a single routable Razor component or a folder of components
163163
<h1>Counter</h1>
164164
```
165165

166-
The [`DisableRateLimiting` attribute](xref:Microsoft.AspNetCore.RateLimiting.DisableRateLimitingAttribute) is used to disable rate limiting for a routable component or a folder of components via an `_Imports.razor` file.
167-
168166
The [`[EnableRateLimiting]` attribute](xref:Microsoft.AspNetCore.RateLimiting.EnableRateLimitingAttribute) is only applied to a routable component or a folder of components via an `_Imports.razor` file if <xref:Microsoft.AspNetCore.Builder.RateLimiterEndpointConventionBuilderExtensions.RequireRateLimiting%2A> is ***not*** called on <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>.
169167

168+
The [`[DisableRateLimiting]` attribute](xref:Microsoft.AspNetCore.RateLimiting.DisableRateLimitingAttribute) is used to disable rate limiting for a routable component or a folder of components via an `_Imports.razor` file.
169+
170170
## Rate limiter algorithms
171171

172172
The [`RateLimiterOptionsExtensions`](/dotnet/api/microsoft.aspnetcore.ratelimiting.ratelimiteroptionsextensions) class provides the following extension methods for rate limiting:

0 commit comments

Comments
 (0)