Repository navigation
Handle leading slash on route prefix during index.html GET - #4084
Conversation
❌ 6 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
martincostello
left a comment
There was a problem hiding this comment.
Thanks - would you mind adding a test somewhere that would have caught this?
|
Nevermind, I see it's covered by integration tests. I'll try to fit something in there to include a route prefix with leading |
…ve route prefix paths
|
I didn't love the idea of creating new test sites just for the route prefix, so instead I added some extra |
7018e3f
into
domaindrivendev:master
|
Thanks! |
|
Thanks for your contribution @superstator - the changes from this pull request have been published as part of version 10.3.0 📦, which is now available from NuGet.org 🚀 |
Pull Request
The issue or feature being addressed
Minor bug encountered in #4083
Details on the issue fix or feature implementation
This change modifies the regular expression used in
SwaggerUIMiddleware.cs(line 58) to allow matching when_options.RoutePrefixcontains a leading/. A similar regular expression is used on line 46 to match the route and return a redirect toindex.html, but it already handles the presence or absence of a leading/, so this change simply brings them more in sync.