Skip to content

Commit 4f73641

Browse files
authored
Store original request path it gets overriden by .gz forward
1 parent 456454f commit 4f73641

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Components/WebAssembly/testassets/HostedInAspNet.Server/BootResourceRequestLog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class BootResourceRequestLog
1111

1212
public IReadOnlyCollection<string> RequestPathsWithNewContent => _requestPaths;
1313

14-
public void AddRequest(HttpRequest request, HttpResponse response)
14+
public void AddRequest(string originalRequestPath, HttpResponse response)
1515
{
1616
if (response.StatusCode != StatusCodes.Status304NotModified)
1717
{

src/Components/WebAssembly/testassets/HostedInAspNet.Server/Startup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, BootReso
2626
var mapAllApps = Configuration.GetValue<bool>("MapAllApps");
2727
app.Use(async (context, next) =>
2828
{
29+
string originalRequestPath = request.Path;
2930
await next(context);
3031

3132
// This is used by E2E tests to verify that the correct resources were fetched,
3233
// and that it was possible to override the loading mechanism
3334
if (context.Request.Query.ContainsKey("customizedbootresource")
3435
|| context.Request.Headers.ContainsKey("customizedbootresource"))
3536
{
36-
bootResourceRequestLog.AddRequest(context.Request, context.Response);
37+
bootResourceRequestLog.AddRequest(originalRequestPath, context.Response);
3738
}
3839
});
3940

0 commit comments

Comments
 (0)