http-swagger icon indicating copy to clipboard operation
http-swagger copied to clipboard

possible parsing issue

Open leifj opened this issue 4 years ago • 0 comments

I am trying to deploy swagger below the basePath so that the swagger handler owns example.com/foo/swagger rather than example.com/swagger

When I open example.com/foo/swagger/index.html in the browser everything works as expected but example.com/foo/swagger/ redirects to example.com/swagger/index.html rather than to example.com/foo/swagger/index.html

http-swagger parses the request URL over here:

https://github.com/swaggo/http-swagger/blob/58ac5e232fbadc57a0ff634710a10360847212ca/swagger.go#L68

I suspect something is wrong with that regexp. I dunno if it is obvious what is going wrong from my description but I'll try to investigate further and provide a PR if that helps.

leifj avatar Dec 01 '20 20:12 leifj