Allow stripPrefix to be less strict about contextPaths #3009
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.
@spencergibb I was thinking about the issue #1935 .. would something like this be appropriate?
This is not complete, and tests would need to be added. But it would be convenient of users of StripPrefix (or additional filters) could dictate whether the strict validation should be enforced?
I know for the use case I am facing we don't need the context path enforced on the target service. But I am presuming that this was introduced for a reason. However, when I override this locally with a different filter (which is the same as StripPrefix but with the change in the PR hard coded), everything seems to work fine.
If you think there is merit here, I am happy to continue getting the tests to pass and adding in new tests. I just wanted to confirm with you whether this was a plausible solution. If so, I will try to get this into a mergeable state (in case I haven't been clear, this Pull Request is not in a mergeable state).
Thanks