[hostBasedConfig] implement way to speficy proxy host based config #120
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.
Fixes #69
This PR adds a way to specify configuration that is host based. It does this by adding a new config key,
sense.proxyConfig
. The value of this key is an array of objects, each of which is a rule that may change the configuration for a request by matching it's url.sense.proxyConfig[].match
Each rule in the
proxyConfig
list may define amatch
property which contains a set of wildcard patterns to be matched against incoming requests. Thismatch
object can contain the following properties, they all default to*
:match.protocol
https
match.host
*
,*.internal.org
match.port
92??
(9200-9299)match.path
/.kibana/**
sense.proxyConfig[].ssl
Each rule can specify ssl configuration to be applied to matching requests. The
ssl
object can contain the following properties:ssl.verify
false
then invalid ssl certificates will be allows for this request. This setting has not effect ifssl.ca
,ssl.cert
, orssl.key
are definedtrue
ssl.ca
ssl.cert
ssl.ca
ssl.cert
but I'm not suresense.proxyConfig[].timeout
The only non-ssl-related config that can be set via
sense.proxyConfig
istimeout
. Setting this will change the timeout applied to this request.Example
Creates the following configs:
Remaining Work: