lesstif / php-jira-rest-client

PHP classes interact Jira with the REST API.
Other
510 stars 263 forks source link

Support custom headers in API calls #471

Closed alanbort closed 2 years ago

alanbort commented 2 years ago

Hello maintainers,

I have a strange scenario where our JIRA Server is hosted in a secure network and only exposed to the application clusters via an API Gateway/Proxy. This is not a standard HTTP egress proxy but a full blown API Gateway that does an extra layer of authentication. This layer of authentication requires both an SSL certificate AND a special header with an API Key.

I have found the ability to add the SSL Certificate via the CURLOPTS_SSL_* environment variables in .env, however I couldn't find a way to add the extra HTTP header with the API Key.

I modified the code a little bit and was able to inject the relevant key in the calls, so I would like to contribute a change that adds a new configuration variable (e.g.: CURLOPS_EXTRA_HTTP_HEADERS with a JSON of additional headers to be added in the JiraClient.

This issue is to discuss if this feature makes sense in this project.

Thank you very much! Alan.-

lesstif commented 2 years ago

Hi @alanbort .

I think that your request is not satisfied the general purpose. so fork and modify for your own repository is a great choice.