influxdb-client-php icon indicating copy to clipboard operation
influxdb-client-php copied to clipboard

Guzzle default headers are overwritten

Open cocochepeau opened this issue 1 year ago • 3 comments

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. Create an influx client with custom httpClient which has some "default" headers set.
  2. Get for example a writeApi instance, and send some points with DEBUG mode enabled.
  3. We dont see the custom added headers being sent to influx when looking at influx client logfile.

Expected behavior: We should see the custom headers being sent to influx host. To add some context I have influx API under cloudflare zero trust. I want to use service tokens to allow influx client to connect to and write points to my influx API. AFAIK this is not possible ATM due to this headers issue.

Actual behavior: Headers are I guess overwritten when calling the "send" request from http client, more details: https://docs.guzzlephp.org/en/7.0/request-options.html?highlight=default%20header#headers

Specifications:

  • Client Version: Guzzle 7
  • InfluxDB Version: latest
  • Platform: linux (debian)

cocochepeau avatar Aug 08 '24 09:08 cocochepeau

Hi @cocochepeau,

Thank you for using our client! We truly appreciate your engagement and feedback.

We are always looking to improve and would love to see contributions from our user community. Is this something you would be willing to assist with? Whether it's enhancing functionality, fixing bugs, or improving documentation, every Pull Request is welcome.

We would be happy to review your submission and work with you to integrate it into our project. If you need any guidance on how to get started or have any questions about the process, please don't hesitate to ask.

Looking forward to potentially collaborating with you!

Best Regards

bednar avatar Aug 08 '24 09:08 bednar

Greetings, I can have a look when I got time (no ETA!).

Best,

cocochepeau avatar Aug 10 '24 09:08 cocochepeau

Thanks a lot! 👍

On Saturday, August 10, 2024, sykz42 @.***> wrote:

Greetings, I can have a look when I got time (no ETA!).

Best,

— Reply to this email directly, view it on GitHub https://github.com/influxdata/influxdb-client-php/issues/157#issuecomment-2280588206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADPDYJ2GLSZP3PN7CX5RITZQXMKFAVCNFSM6AAAAABMGBESMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBQGU4DQMRQGY . You are receiving this because you commented.Message ID: @.***>

bednar avatar Aug 12 '24 03:08 bednar