After checked the source code, The following files should be changed. I have verified the changes and it worked well in my environment.
AddBaGetWebApplication method in IServiceCollectionExtensions.cs
` public static IServiceCollection AddBaGetWebApplication(
this IServiceCollection services,
Action configureAction)
{
services
.AddRouting(options => options.LowercaseUrls = true)
.AddControllers()
.AddApplicationPart(typeof(PackageContentController).Assembly)
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
.AddJsonOptions(options =>
{
options.JsonSerializerOptions.IgnoreNullValues = true;
});
// Enable reverse proxy and load balancer support
services.Configure(options =>
{
options.ForwardedHeaders = ForwardedHeaders.All;
});
Environment
Windows, URLRewrite, IIS
Issues
After checked the source code, The following files should be changed. I have verified the changes and it worked well in my environment. AddBaGetWebApplication method in IServiceCollectionExtensions.cs ` public static IServiceCollection AddBaGetWebApplication( this IServiceCollection services, Action configureAction)
{
services
.AddRouting(options => options.LowercaseUrls = true)
.AddControllers()
.AddApplicationPart(typeof(PackageContentController).Assembly)
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
.AddJsonOptions(options =>
{
options.JsonSerializerOptions.IgnoreNullValues = true;
});
// Enable reverse proxy and load balancer support
services.Configure(options =>
{
options.ForwardedHeaders = ForwardedHeaders.All;
});
AbsoluteUrl method in BaGetUrlGenerator.cs
` private string AbsoluteUrl(string relativePath) { var request = _httpContextAccessor.HttpContext.Request;