splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

Need to add a header to get past our load balancer when connecting to splunk host

Open DanEhrlich opened this issue 8 years ago • 1 comments

There is a load balancer in front of the search heads for a splunk instance I am trying to connect to. Is there a way to add a header that will always get sent when talking to the instance?

I do the following in curl and need an equivalent way using the Python SDK:

curl -kv -H 'Magic-Header: <MY_MAGIC_TOKEN>' ...

Any help would be appreciated.

DanEhrlich avatar Feb 06 '18 19:02 DanEhrlich

Hi @DanEhrlich,

You can define a custom handler method that sets your header. See the handler example.

shakeelmohamed avatar Feb 13 '18 20:02 shakeelmohamed