Skip to content

Commit 632b78b

Browse files
Merge pull request #1413 from tridattran/master
SwaggerUIMiddleware - lock down Index page redirect to the exact conf…
2 parents 45a3019 + dd30c5a commit 632b78b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Swashbuckle.AspNetCore.SwaggerUI/SwaggerUIMiddleware.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public async Task Invoke(HttpContext httpContext)
6161
return;
6262
}
6363

64-
if (httpMethod == "GET" && Regex.IsMatch(path, $"/{_options.RoutePrefix}/?index.html"))
64+
if (httpMethod == "GET" && Regex.IsMatch(path, $"^/{_options.RoutePrefix}/?index.html$"))
6565
{
6666
await RespondWithIndexHtml(httpContext.Response);
6767
return;

0 commit comments

Comments
 (0)