Skip to content

Commit ff28401

Browse files
Corrected some spelling/wording in YARP node
1 parent 634bab5 commit ff28401

13 files changed

+39
-39
lines changed

aspnetcore/fundamentals/servers/yarp/diagnosing-yarp-issues.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ By default ASP.NET will log to the console, and the configuration file can be us
3232
},
3333
```
3434

35-
You want logging infomation from the "Microsoft.AspNetCore.\*" and "Yarp.ReverseProxy.\*" providers. The example above will emit "Information" level events from both providers to the Console. Changing the level to "Debug" will show additional entries. ASP.NET implements change detection for configuration files, so you can edit the appsettings.json file (or appsettings.development.json if running from Visual Studio) while the project is running and observe changes to the log output.
35+
You want logging information from the "Microsoft.AspNetCore.\*" and "Yarp.ReverseProxy.\*" providers. The example above will emit "Information" level events from both providers to the Console. Changing the level to "Debug" will show additional entries. ASP.NET implements change detection for configuration files, so you can edit the appsettings.json file (or appsettings.development.json if running from Visual Studio) while the project is running and observe changes to the log output.
3636

3737
> Note: Settings in the appsettings.development.json file will override settings in appsettings.json when running in development, so make sure that if you are editing appsettings.json that the values are not overridden.
3838
@@ -44,10 +44,10 @@ The logging output is directly tied to the way that ASP.NET Core processes reque
4444
| ----- | ----------- | ----------- |
4545
| dbug | Microsoft.AspNetCore.Server.Kestrel.Connections[39]<br>Connection id "0HMCD0JK7K51U" accepted.| Connections are independent of requests, so this is a new connection |
4646
| dbug | Microsoft.AspNetCore.Server.Kestrel.Connections[1]<br>Connection id "0HMCD0JK7K51U" started. | |
47-
| info | Microsoft.AspNetCore.Hosting.Diagnostics[1]<br>Request starting HTTP/1.1 GET http://localhost:5000/ - - | This is the incomming request to ASP.NET |
48-
| dbug | Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[0]<br>Wildcard detected, all requests with hosts will be allowed. | My configuation does not tie endpoints to specific hostnames |
47+
| info | Microsoft.AspNetCore.Hosting.Diagnostics[1]<br>Request starting HTTP/1.1 GET http://localhost:5000/ - - | This is the incoming request to ASP.NET |
48+
| dbug | Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware[0]<br>Wildcard detected, all requests with hosts will be allowed. | My configuration does not tie endpoints to specific hostnames |
4949
| dbug | Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1001]<br>1 candidate(s) found for the request path '/' | This shows what possible matches there are for the route |
50-
| dbug | Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1005]<br> Endpoint 'minimumroute' with route pattern '{\*\*catch-all}' is valid for the request path '/' | The mimimum route from YARPs configuration has matched|
50+
| dbug | Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1005]<br> Endpoint 'minimumroute' with route pattern '{\*\*catch-all}' is valid for the request path '/' | The minimum route from YARPs configuration has matched|
5151
| dbug | Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware[1]<br> Request matched endpoint 'minimumroute' | |
5252
| info | Microsoft.AspNetCore.Routing.EndpointMiddleware[0]<br> Executing endpoint 'minimumroute' | |
5353
| info | Yarp.ReverseProxy.Forwarder.HttpForwarder[9]<br> Proxying to http://www.example.com/ | YARP is proxying the request to example.com |
@@ -155,7 +155,7 @@ public class ForwarderTelemetry : IForwarderTelemetryConsumer
155155
/// Called before forwarding a request from `ForwarderMiddleware`, therefore is not called for direct forwarding scenarios.
156156
public void OnForwarderInvoke(DateTime timestamp, string clusterId, string routeId, string destinationId)
157157
{
158-
Console.WriteLine($"Forwarder Telemetry [{timestamp:HH:mm:ss.fff}] => OnForwarderInvoke:: Cluster id: {clusterId}, Route Id: { routeId}, Destination: {destinationId}");
158+
Console.WriteLine($"Forwarder Telemetry [{timestamp:HH:mm:ss.fff}] => OnForwarderInvoke:: Cluster id: {clusterId}, Route Id: {routeId}, Destination: {destinationId}");
159159
}
160160
}
161161
```

aspnetcore/fundamentals/servers/yarp/extensibility-transforms.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ ai-usage: ai-assisted
1515
## Introduction
1616
When proxying a request it's common to modify parts of the request or response to adapt to the destination server's requirements or to flow additional data such as the client's original IP address. This process is implemented via Transforms. Types of transforms are defined globally for the application and then individual routes supply the parameters to enable and configure those transforms. The original request objects are not modified by these transforms, only the proxy requests.
1717

18-
YARP includes a set of built-in request and response transforms that can be used. See [Transforms](./transforms.md) for more details. If those transforms are not sufficient, then custom transfrorms can be added.
18+
YARP includes a set of built-in request and response transforms that can be used. See [Transforms](./transforms.md) for more details. If those transforms are not sufficient, then custom transforms can be added.
1919

2020
## RequestTransform
2121

22-
All request transforms must derive from the abstract base class [RequestTransform](xref:fundamentals/servers/yarp/transforms). These can freely modify the proxy `HttpRequestMessage`. Avoid reading or modifying the request body as this may disrupt the proxying flow. Consider also adding a parametrized extension method on `TransformBuilderContext` for discoverability and easy of use.
22+
All request transforms must derive from the abstract base class [RequestTransform](xref:fundamentals/servers/yarp/transforms). These can freely modify the proxy `HttpRequestMessage`. Avoid reading or modifying the request body as this may disrupt the proxying flow. Consider also adding a parametrized extension method on `TransformBuilderContext` for discoverability and ease of use.
2323

2424
A request transform may conditionally produce an immediate response such as for error conditions. This prevents any remaining transforms from running and the request from being proxied. This is indicated by setting the `HttpResponse.StatusCode` to a value other than 200, or calling `HttpResponse.StartAsync()`, or writing to the `HttpResponse.Body` or `BodyWriter`.
2525

@@ -45,7 +45,7 @@ All response trailers transforms must derive from the abstract base class [Respo
4545

4646
## Request body transforms
4747

48-
YARP does not provide any built in transforms for modifying the request body. However, the body can be modified in custom transforms.
48+
YARP does not provide any built in transforms for modifying the request body. However, the body can be modified by custom transforms.
4949

5050
Be careful about which kinds of requests are modified, how much data gets buffered, enforcing timeouts, parsing untrusted input, and updating the body-related headers like `Content-Length`.
5151

@@ -76,7 +76,7 @@ This sample requires YARP 1.1, see https://github.com/microsoft/reverse-proxy/pu
7676

7777
## Response body transforms
7878

79-
YARP does not provide any built in transforms for modifying the response body. However, the body can be modified in custom transforms.
79+
YARP does not provide any built in transforms for modifying the response body. However, the body can be modified by custom transforms.
8080

8181
Be careful about which kinds of responses are modified, how much data gets buffered, enforcing timeouts, parsing untrusted input, and updating the body-related headers like `Content-Length`. You may need to decompress content before modifying it, as indicated by the Content-Encoding header, and afterwards re-compress it or remove the header.
8282

aspnetcore/fundamentals/servers/yarp/extensibility.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ YARP uses the concept of [Routes](xref:fundamentals/servers/yarp/config-files#ro
2323

2424
![Middleware pipeline diagram](~/fundamentals/servers/yarp/media/yarp-pipeline.png)
2525

26-
Most of the pre-built pipeline can be customized through code:
26+
Most of the prebuilt pipeline can be customized through code:
2727

2828
- [Configuration Providers](xref:fundamentals/servers/yarp/config-providers)
2929
- [Destination Enumeration](xref:fundamentals/servers/yarp/destination-resolvers)
@@ -37,10 +37,10 @@ You can also change the pipeline definition to replace modules with your own imp
3737

3838
## Http Forwarder
3939

40-
If the YARP pipeline is too rigid for your needs, or the scale of routing rules and destinations is not suitable for loading into memory, then you can implement your own routing logic and use the HTTP Forwarder to direct requests to your chosen destination. The HttpForwarder component takes the HTTP context and forwards the request to the supplied destination.
40+
If the YARP pipeline is too rigid for your use case, or the scale of routing rules and destinations is not suitable for loading into memory, then you can implement your own routing logic and use the HTTP Forwarder to direct requests to your chosen destination. The HttpForwarder component takes the HTTP context and forwards the request to the supplied destination.
4141

4242
![HTTP forwarder diagram](~/fundamentals/servers/yarp/media/yarp-forwarder.png)
4343

44-
The transform component can still be used with the forwarder is needed.
44+
The transform component can still be used if the forwarder is needed.
4545

4646
For more information see [Direct forwarding](xref:fundamentals/servers/yarp/direct-forwarding).

aspnetcore/fundamentals/servers/yarp/getting-started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ai-usage: ai-assisted
1212

1313
# Getting Started with YARP
1414

15-
YARP is designed as a library that provides the core proxy functionality which you can then customize by adding or replacing modules. YARP is currently provided as a NuGet package and code snippets. We plan on providing a project template and prebuilt executable (`.exe`) in the future.
15+
YARP is designed as a library that provides the core proxy functionality which you can then customize by adding or replacing modules. YARP is currently provided as a NuGet package and code samples. We plan on providing a project template and prebuilt executable (`.exe`) in the future.
1616

1717
YARP is implemented on top of .NET Core infrastructure and is usable on Windows, Linux or MacOS. Development can be done with the SDK and your favorite editor, [Microsoft Visual Studio](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/).
1818

@@ -24,7 +24,7 @@ You can download the .NET SDK from https://dotnet.microsoft.com/download/dotnet/
2424

2525
A complete version of the project built using the steps below can be found at [Basic YARP Sample](https://github.com/microsoft/reverse-proxy/tree/release/latest/samples/BasicYarpSample).
2626

27-
Start by creating an "Empty" ASP.NET Core application using the command line:
27+
Start by creating an empty ASP.NET Core application using the command line:
2828

2929
```dotnetcli
3030
dotnet new web -n MyProxy
@@ -97,6 +97,6 @@ Learn more about the available configuration options by looking at <xref:Yarp.Re
9797

9898
## Run the project
9999

100-
When using the .NET CLU, use `dotnet run` called within the sample's directory or `dotnet run --project <path to .csproj file>`.
100+
When using the .NET CLI, use `dotnet run` within the sample's directory or `dotnet run --project <path to .csproj file>`.
101101

102-
In Visual Studio, start the app with the **Run** button.
102+
In Visual Studio, start the app by clicking the **Run** button.

aspnetcore/fundamentals/servers/yarp/grpc.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
uid: fundamentals/servers/yarp/grpc
3-
title: YARP Proxing gRPC
4-
description: YARP Proxing gRPC
3+
title: YARP Proxying gRPC
4+
description: YARP Proxying gRPC
55
author: samsp-msft
66
ms.author: samsp
77
ms.date: 2/6/2025
@@ -10,7 +10,7 @@ content_well_notification: AI-contribution
1010
ai-usage: ai-assisted
1111
---
1212

13-
# YARP Proxing gRPC
13+
# YARP Proxying gRPC
1414

1515
## Introduction
1616

@@ -38,7 +38,7 @@ This shows configuring Kestrel to use HTTP/2 over http (non-TLS):
3838

3939
## Configure YARP's Outgoing Protocols
4040

41-
YARP automatically negotiates HTTP/1.1 or HTTP/2 for outgoing proxy requests, but only for https (TLS). HTTP/2 over http (non-TLS) requires additional settings. Note outgoing protocols are independent of incoming ones. E.g. https can be used for the incoming connection and http for the outgoing one, this is called TLS termination. See [here](http-client-config.md#httprequest) for configuration details.
41+
YARP automatically negotiates HTTP/1.1 or HTTP/2 for outgoing proxy requests, but only for https (TLS). HTTP/2 over http (non-TLS) requires additional settings. Note that outgoing protocols are independent of incoming ones. E.g. https can be used for the incoming connection and http for the outgoing one, this is called TLS termination. For configuration details, see [here](http-client-config.md#httprequest).
4242

4343
This shows configuring the outgoing proxy request to use HTTP/2 over http.
4444
```json

aspnetcore/fundamentals/servers/yarp/header-guidelines.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
uid: fundamentals/servers/yarp/header-guidelines
3-
title: YARP HTTP Headers
4-
description: YARP HTTP Headers
3+
title: YARP HTTP Header Guidelines
4+
description: YARP HTTP Header Guidelines
55
author: samsp-msft
66
ms.author: samsp
77
ms.date: 2/6/2025
@@ -10,17 +10,17 @@ content_well_notification: AI-contribution
1010
ai-usage: ai-assisted
1111
---
1212

13-
# YARP HTTP Headers
13+
# YARP HTTP Header Guidelines
1414

15-
Headers are a very important part of processing HTTP requests and each have their own semantics and considerations. Most headers are proxied by default, though some used to control how the request is delivered are automatically adjusted or removed by the proxy. The connections between the client and the proxy and the proxy and destination are independent, and so headers that affect the connection and transport need to be filtered. Many headers contain information like domain names, paths, or other details that may be affected when a reverse proxy is included in the application architecture. Below is a collection of guidelines about how specific headers might be impacted and what to do about them.
15+
Headers are a very important part of processing HTTP requests and each have their own semantics and considerations. Most headers are proxied by default, though some used to control how the request is delivered are automatically adjusted or removed by the proxy. The connections between the client and the proxy, and the proxy and the destination, are independent. Therefore, headers that affect the connection and transport need to be filtered. Many headers contain information like domain names, paths, or other details that may be affected when a reverse proxy is included in the application architecture. Below is a collection of guidelines about how specific headers might be impacted and what to do about them.
1616

1717
## YARP header filtering
1818

1919
YARP automatically removes request and response headers that could impact its ability to forward a request correctly, or that may be used maliciously to bypass features of the proxy. A complete list can be found [here](https://github.com/microsoft/reverse-proxy/blob/main/src/ReverseProxy/Forwarder/RequestUtilities.cs#L71), with some highlights described below.
2020

2121
### Connection, KeepAlive, Close
2222

23-
These headers control how the TCP connection is managed and are removed to avoid impacting the connection on the other side of the proxy.
23+
These headers control how the TCP connection is managed and are removed to prevent impacting the connection on the other side of the proxy.
2424

2525
### Transfer-Encoding
2626

@@ -45,7 +45,7 @@ This response header is used with HTTP/3 upgrades and only applies to the immedi
4545
### Distributed tracing headers
4646

4747
These headers include TraceParent, Request-Id, TraceState, Baggage, Correlation-Context.
48-
They are automatically removed based on `DistributedContextPropagator.Fields` so that the forwarding HttpClient can replace them with updated values.
48+
They are automatically removed based on `DistributedContextPropagator.Fields`, allowing the forwarding HttpClient to replace them with updated values.
4949
You can opt out of modifying these headers by setting `SocketsHttpHandler.ActivityHeadersPropagator` to `null`:
5050
```C#
5151
services.AddReverseProxy()
@@ -60,7 +60,7 @@ This header instructs clients to always use HTTPS, but there may be a conflict b
6060

6161
### Host
6262

63-
The Host header indicates which site on the server the request is intended for. This header is removed by default since the host name used publicly by the proxy is likely to differ from the one used by the service behind the proxy. This is configurable using the [RequestHeaderOriginalHost](xref:fundamentals/servers/yarp/transforms#requestheaderoriginalhost) transform.
63+
The Host header indicates which site on the server the request is intended for. This header is removed by default since the host name used publicly by the proxy is likely to differ from the one used by the service behind the proxy. This can be configured using the [RequestHeaderOriginalHost](xref:fundamentals/servers/yarp/transforms#requestheaderoriginalhost) transform.
6464

6565
### X-Forwarded-*, Forwarded
6666

@@ -72,7 +72,7 @@ Some clients and servers limit which HTTP methods they allow (GET, POST, etc.).
7272

7373
### Set-Cookie
7474

75-
This response header may contain fields constraining the path, domain, scheme, etc. where the cookie should be used. Using a reverse proxy may change the effective domain, path, or scheme of a site from the public view. While it would be possible to [rewrite](https://github.com/microsoft/reverse-proxy/issues/1109) response cookies using custom transforms, it's recommended instead to use the Forwarded headers described above to flow the correct values to the destination app so it can generate the correct set-cookie headers.
75+
This response header may contain fields that constrain the path, domain, scheme, etc. where the cookie should be used. Using a reverse proxy may change the effective domain, path, or scheme of a site from the public view. While it would be possible to [rewrite](https://github.com/microsoft/reverse-proxy/issues/1109) response cookies using custom transforms, it's recommended instead to use the Forwarded headers described above to flow the correct values to the destination app so it can generate the correct set-cookie headers.
7676

7777
### Location
7878

0 commit comments

Comments
 (0)