genomic-medicine-sweden / docker-sc2reporter

Dockerized version of the sc2reporter program.
GNU General Public License v2.0
0 stars 1 forks source link

The backend is redirecting calls by adding /api even if /api is included in the url #97

Closed elevu closed 1 year ago

elevu commented 1 year ago

For example https://34.125.210.143/api/samples becomes https://34.125.210.143/api/api/samples

Fattigman commented 1 year ago

That's a weird behavior, will look into it straight away

Fattigman commented 1 year ago

It was a bug in fastapi routing module. When no trailing slash is suplied in the url, it redirects the request to the same url with doubled prefixes. https://34.125.210.143/api/samples/ would work fine but https://34.125.210.143/api/samples would not.

I have however fixed this bug now by modifying the routing module so that it adds a trailing slashes when none i provided in the url.