Skip to content

Allow setting custom headers or the cookie header for the gitlab client

Hi,

I work with a setup where the gitlab instance I am interacting with is behind an authentication proxy. To bypass it one has to send a specific authentication cookie with the API requests to gitlab.
Looking at the code in config.go there is no support for setting headers.
The go library would support this :

gitlab.WithRequestOptions(
	gitlab.WithHeader("headername", "headervalue"),
)

Would you be interested to allow users to set either arbitrary headers, or at least the cookie header?
I would be willing to create a pull request for either options