-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Relevant to #42553
app.UseSwagger().UseSwaggerUI(c =>
{
c.SwaggerEndpoint($"{pathBase}/swagger/v6.0/swagger.json", "AspNetCoreWebApi V6.0");
});
Tried both app.UsePathBase()
and the following code:
app.Use(async (context, next) =>
{
context.Request.PathBase = new PathString(pathBase); // Kubernetes ingress rule. This works.
await next(context);
}
Swagger UI does not use the PATH_BASE as configured to reach the API endponts.
Expected Behavior
Swagger to use configured PATH_BASE to reach API endpoints.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
6.0.301
Anything else?
No response
Metadata
Metadata
Assignees
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels