Convert url for getting tasks to relative #2121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was using Locust UI with kubernetes and after setting up ingress rule to expose the service on custom path I have noticed periodic 404 errors in the browser console occurring each second.
This happens because when using urls with absolute path that starts with
/
custom base path used for exposing the service in ingress rules gets lost so instead of 200http://domain.com/locust/tasks
we get 404http://domain.com/tasks
.This change will make it relative so that base path
/locust
in example before will be preserved.This is also related to issues #149, #2030 and PR 692 that solved this problem for code before
30 May 2018
.This will also solve issue #2071 reported by @benispeti