Skip to content

Commit

Permalink
fix: url consistency between Scalar UI and browser
Browse files Browse the repository at this point in the history
  • Loading branch information
SulliNV committed Nov 27, 2024
1 parent 99999ac commit 7b5c757
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion template/src/Placeholder.ServiceDefaults/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ public static WebApplication ConfigureMiddlewares(this WebApplication app)
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
app.MapScalarApiReference();
app.MapScalarApiReference(options =>
{
// This is necessary to ensure proper API url mapping between the Scalar UI and the browser
// See comments in https://dev.azure.com/nventive/Practice%20committees/_workitems/edit/305140 for more information
options.Servers = Array.Empty<ScalarServer>();
});
}

return app;
Expand Down

0 comments on commit 7b5c757

Please sign in to comment.