Add url_post template parameter for remote cdx api #587
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.
Description
This change provides a new parameter
url_post
to the template used to configure a remote index source. Theurl_post
parameter includes the original url with POST data appended as, if available. The parameter__wb_post_data
is extracted from the final url key.Motivation and Context
This resolves a problem with communicating POST parameters to OutbackCDX. It fixes a replay issue described in #585. OutbackCDX has in the meantime been extended to index POST parameters as described in nla/outbackcdx#91. A sample config.yaml for OutbackCDX looks like this:
I first tried using the existing
alt_url
. However, the alt_url is based on the original (unfiltered) url and it is not available for all calls. In order not to break existing solutions, I propose to use this new parameter.Types of changes
Checklist:
Still missing: tests (work in progress), documentation updates. Feedback and discussion welcome!