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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for cases that have requests only for base route e.g.
/search?q=something
However I'm not sure it would work for deeper routes like e.g.
/api/products/search?q=something
, can you please confirm that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because
proxyRoute
option param above is selecting mountpath for proxy, so I'm wondering if that has any impact in this caseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be honest I'm not even sure why this line is there maybe we can remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my case
req.baseUrl
contains/api/some-service/some-entity/find
andreq.url
contains/?parameter=test
. Concatenating them seems to yield the correct address. I've tested it with urls without any parameters as well.If I remove the line the url only consists
/?parameter=test
and fails!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amygdaloideum thanks, looks good to me 👍
I was planning to write some tests for basic features, I gonna use this as a test case
good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amygdaloideum added test coverage for your case here: #18
confirmed to be working as expected :)