Description
Describe the bug
When springdoc.swagger-ui.path=/
, the oauth2 redirect url is incorrectly calculated as http:/webjars/swagger-ui/oauth2-redirect.html
To Reproduce
spring boot 2.4.2
springdoc-openapi-webflux-ui 1.5.2
Configure springdoc.swagger-ui.path=/
Start application
Hit http://host:port/ first. (it is important that this url is hit first, before any other urls, for the bug to reproduce)
Then hit http://host:port/v3/api-docs/swagger-config
Notice "oauth2RedirectUrl": "http:/webjars/swagger-ui/oauth2-redirect.html",
Expected behavior
I expect oauth2RedirectUrl to be http://host:port/webjars/swagger-ui/oauth2-redirect.html",
Additional context
I believe the problem is here:
In this case, request.getPath().toString == '/', so "http:host:port" is assigned to the url variable, which screws up the downstream logic.