Closed costrouc closed 2 years ago
Hey, I just saw this. The problem only exists inside the condaStoreServerStatus
function, where a request is set to the URL provided by getServerUrl(baseUrl)
. While this change fixes that specific request, it makes the requests for all the other endpoints have an extra /
in them - for example, the endpoint targeted by fetchEnvironments
is ${getServerUrl(baseUrl)}/environment/?page=${page}&size=${size}
, which becomes https://localhost:5000//environment/?page=${page}&size=${size}
in my local environment. Does that extra slash matter here?
Another approach would be just to explicitly put the /
where it should be in the condaStoreServerStatus
function.
Another possibility is to use the current fix and use URLExt.join
from @jupyterlab/coreutils
that will take care of joining URL part without duplicated slashes.
Closing following #177
For now Conda-Store is using Flask for the web server. It redirects requests that don't correctly match to a close matching one. E.g. /api/v1 -> /api/v1/. When using https this results in a CORS error. Here is the url that is set in conda-store https://github.com/Quansight/conda-store/blob/main/conda-store-server/conda_store_server/server/views/api.py#L99.