lesstif/php-jira-rest-client

Support custom headers in API calls

alanbort opened this issue · 1 comments

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.-

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.