Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Proxy Headers in JIRA Package (e.g., Proxy-Authorization) #1868

Open
kuro96al opened this issue Jun 14, 2024 · 1 comment
Open

Comments

@kuro96al
Copy link

kuro96al commented Jun 14, 2024

Bug summary

I would like to ask if the jira package supports setting proxy headers. Specifically, I need to set the Proxy-Authorization header to use a bearer token for my requests. However, I couldn't find an implementation for this in the jira package.

I'm going to provide an example of using urllib3 with proxy headers.


    proxy_headers = {
        'Proxy-Authorization': f'Bearer {access_token}',
    }
    openai_url = 'https://api.openai.com/v1/chat/completions'
    headers = {
        'Content-Type': 'application/json',
        'Authorization': f'Bearer {api_key}',
    }
    data = {
        'model': 'gpt-3.5-turbo',
        'messages': [{'role': 'user', 'content': event.get('msg', 'Hi!')}],
    }
    http = urllib3.ProxyManager(proxy_url, proxy_headers=proxy_headers)
    
    ```
@adehad
Copy link
Contributor

adehad commented Jul 9, 2024

Internally we use the requests library, I believe if the proxy address is configured on the self._session object then the Proxy-Authorization can just be passed as a normal header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants