From 5f5603364c01221670b8fb806ba26a3c6fdf6aae Mon Sep 17 00:00:00 2001 From: Miha Zupan Date: Fri, 14 Feb 2025 05:40:13 +0100 Subject: [PATCH] Update more links --- docs/designs/config.md | 2 +- docs/designs/yarp-tunneling.md | 2 +- samples/BasicYarpSample/appsettings.json | 2 +- samples/ReverseProxy.Auth.Sample/README.md | 2 +- samples/ReverseProxy.Config.Sample/appsettings.json | 2 +- .../ConfigProvider/ConfigurationReadingExtensions.cs | 2 +- src/ReverseProxy/Configuration/HttpClientConfig.cs | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/designs/config.md b/docs/designs/config.md index 2fbe536ae..4569066f6 100644 --- a/docs/designs/config.md +++ b/docs/designs/config.md @@ -17,7 +17,7 @@ Config based proxies are common and we'll need to support at least basic proxy s We have three relevant components that already have config systems: Kestrel, UrlRewrite, and ReverseProxy. -- [Kestrel](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.1#endpoint-configuration) +- [Kestrel](https://learn.microsoft.com/aspnet/core/fundamentals/servers/kestrel/endpoints) - [UrlRewrite](https://github.com/dotnet/aspnetcore/blob/f4d81e3af2b969744a57d76d4d622036ac514a6a/src/Middleware/Rewrite/sample/UrlRewrite.xml#L1-L11) - [ReverseProxy](https://github.com/dotnet/yarp/blob/b2cf5bdddf7962a720672a75f2e93913d16dfee7/samples/IslandGateway.Sample/appsettings.json#L10-L34) diff --git a/docs/designs/yarp-tunneling.md b/docs/designs/yarp-tunneling.md index 41d92a7cc..871730246 100644 --- a/docs/designs/yarp-tunneling.md +++ b/docs/designs/yarp-tunneling.md @@ -6,7 +6,7 @@ ## Introduction While many organizations are moving their computing to the cloud, there are occasions where you need to be able to run some services in a local datacenter. The problem then is if you need to be able to communicate with those services from the cloud. Creating a VPN network connection to Azure or other cloud provider is possible, but usually involves a lot of red tape and configuration complexity as the two networks need to be integrated. -If all that the cloud needs to access is resources that are exposed over http, then a simpler solution is to have a gateway that can route traffic to the remote resource. Additionally, outbound connections over http(s) are not usually blocked, so having a on-prem gateway make an outbound connection to the cloud, is the easiest way to establish the route. This is the basis behind the [Azure Relay](https://docs.microsoft.com/en-us/azure/azure-relay/relay-what-is-it) service offering. +If all that the cloud needs to access is resources that are exposed over http, then a simpler solution is to have a gateway that can route traffic to the remote resource. Additionally, outbound connections over http(s) are not usually blocked, so having a on-prem gateway make an outbound connection to the cloud, is the easiest way to establish the route. This is the basis behind the [Azure Relay](https://learn.microsoft.com/azure/azure-relay/relay-what-is-it) service offering. That is the principle of the tunnel feature for YARP. You operate two instances of the YARP proxy service, configured as a tunnel. The advantage over Azure Relay is that using a reverse proxy as an on-prem gateway means that both cloud and back end services can be used without needing to update the application other than addresses. This is particularly useful for services that may have been written by a 3rd party, or are no longer under active development, and so making changes to the configuration is complicated and expensive. Relay requires the sender and reciever to be updated to use its connection protocol. diff --git a/samples/BasicYarpSample/appsettings.json b/samples/BasicYarpSample/appsettings.json index 39c0a0a9d..b782dab85 100644 --- a/samples/BasicYarpSample/appsettings.json +++ b/samples/BasicYarpSample/appsettings.json @@ -1,6 +1,6 @@ { // Base URLs the server listens on, must be configured independently of the routes below. - // Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints + // Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/aspnet/core/fundamentals/servers/kestrel/endpoints "Urls": "http://localhost:5000;https://localhost:5001", //Sets the Logging level for ASP.NET diff --git a/samples/ReverseProxy.Auth.Sample/README.md b/samples/ReverseProxy.Auth.Sample/README.md index f0711d835..5a957746f 100644 --- a/samples/ReverseProxy.Auth.Sample/README.md +++ b/samples/ReverseProxy.Auth.Sample/README.md @@ -1,6 +1,6 @@ # Authentication & Authorization sample -This sample shows how the YARP proxy can be integrated with the ASP.NET [authentication](https://docs.microsoft.com/aspnet/core/security/authentication) and [authorization](https://docs.microsoft.com/en-us/aspnet/core/security/authorization/introduction) system to specify claims requirements on routes that will be enforced by the proxy before it will forward applicable requests. +This sample shows how the YARP proxy can be integrated with the ASP.NET [authentication](https://docs.microsoft.com/aspnet/core/security/authentication) and [authorization](https://docs.microsoft.com/aspnet/core/security/authorization/introduction) system to specify claims requirements on routes that will be enforced by the proxy before it will forward applicable requests. The sample includes the following parts: diff --git a/samples/ReverseProxy.Config.Sample/appsettings.json b/samples/ReverseProxy.Config.Sample/appsettings.json index 30056c07a..1f90e0826 100644 --- a/samples/ReverseProxy.Config.Sample/appsettings.json +++ b/samples/ReverseProxy.Config.Sample/appsettings.json @@ -1,6 +1,6 @@ { // Base URLs the server listens on, must be configured independently of the routes below. - // Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints + // Can also be configured via Kestrel/Endpoints, see https://docs.microsoft.com/aspnet/core/fundamentals/servers/kestrel/endpoints "Urls": "http://localhost:5000;https://localhost:5001", //Sets the Logging level for ASP.NET diff --git a/src/ReverseProxy/Configuration/ConfigProvider/ConfigurationReadingExtensions.cs b/src/ReverseProxy/Configuration/ConfigProvider/ConfigurationReadingExtensions.cs index ec65948a5..1883eda67 100644 --- a/src/ReverseProxy/Configuration/ConfigProvider/ConfigurationReadingExtensions.cs +++ b/src/ReverseProxy/Configuration/ConfigProvider/ConfigurationReadingExtensions.cs @@ -29,7 +29,7 @@ internal static class ConfigurationReadingExtensions internal static TimeSpan? ReadTimeSpan(this IConfiguration configuration, string name) { // Format "c" => [-][d'.']hh':'mm':'ss['.'fffffff]. - // You also can find more info at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier + // You also can find more info at https://docs.microsoft.com/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier return configuration[name] is string value ? TimeSpan.ParseExact(value, "c", CultureInfo.InvariantCulture) : null; } diff --git a/src/ReverseProxy/Configuration/HttpClientConfig.cs b/src/ReverseProxy/Configuration/HttpClientConfig.cs index 4afd2b452..f70805743 100644 --- a/src/ReverseProxy/Configuration/HttpClientConfig.cs +++ b/src/ReverseProxy/Configuration/HttpClientConfig.cs @@ -62,7 +62,7 @@ public sealed record HttpClientConfig /// Note: If you're using an encoding other than UTF-8 here, then you may also need to configure your server to accept request headers with such an encoding via the corresponding options for the server. /// /// For example, when using Kestrel as the server, use to - /// configure Kestrel to use the same encoding. + /// configure Kestrel to use the same encoding. /// /// public string? RequestHeaderEncoding { get; init; } @@ -78,7 +78,7 @@ public sealed record HttpClientConfig /// Note: If you're using an encoding other than ASCII here, then you may also need to configure your server to send response headers with such an encoding via the corresponding options for the server. /// /// For example, when using Kestrel as the server, use to - /// configure Kestrel to use the same encoding. + /// configure Kestrel to use the same encoding. /// /// public string? ResponseHeaderEncoding { get; init; }