galaxyproject / galaxy-helm

Minimal setup required to run Galaxy under Kubernetes
MIT License
41 stars 38 forks source link

Remove trailing slash from /api/users/ as it causes a redirect on AWS #355

Closed ksuderman closed 2 years ago

ksuderman commented 2 years ago

The trailing slash on /api/users/ causes a redirect problem when trying to use BioBlend to create new Galaxy users on AWS instances. I did not see this on GCP or Jetstream, but AWS will redirect calls to /api/users/ to /api/users and BioBlend does not follow redirects. I investigated supplying a PR to BioBlend, but this has been discussed and rejected before [1], and is a moot point since I was trying to POST data and the requests library changes POST to GET so any posted data is lost [2]. Unfortunately (or not) this behavior is allowed by RFC7231 [3]. Therefore the simplest solution is to simply remove the trailing slash, which does not seem to affect anything else.

Further testing is still needed.

  1. https://github.com/galaxyproject/bioblend/pull/336
  2. https://github.com/psf/requests/issues/5284
  3. https://datatracker.ietf.org/doc/html/rfc7231#section-6.4.2
afgane commented 2 years ago

We should check if this works the same way on GCP/JS2.