This Library provides an API to configure BASE_PATH and Forwarded Headers.
The below code needs to be added to the Startup.cs
class. This will configure the Base Path.
public void Configure(IApplicationBuilder app)
{
app.UsePathBaseFromConfiguration();
}
By default the Base Path will be retrieved from the configuration key BASE_PATH
. The name of the configuration key can be overridden by using the extension method which accepts the config key Name as a parameter.
app.UsePathBaseFromConfiguration("configKeyName");
The below code needs to be added to the Startup.cs
class. This will configure the Forwarded Headers.
public void ConfigureServices(IServiceCollection services)
{
services.ConfigureForwardedHeaders();
}
public void Configure(IApplicationBuilder app)
{
app.UseForwardedHeaders();
}