Skip to content

Commit

Permalink
Fix problems with double slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
cau777 committed Mar 27, 2023
1 parent 1a3602b commit 3f55c7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ImageService/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Globalization;
using Microsoft.AspNetCore.HttpLogging;
using Microsoft.AspNetCore.Localization;
using Microsoft.AspNetCore.Rewrite;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.Logging.ClearProviders();
Expand All @@ -18,6 +19,10 @@
});

WebApplication app = builder.Build();
var options = new RewriteOptions();
// Remove double slashes
options.AddRewrite("/*(.*)", "$1", false);
app.UseRewriter(options);

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
Expand Down

0 comments on commit 3f55c7a

Please sign in to comment.