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

Add user-agent to outgoing BossDB remote calls #110

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

---

## v?.?.? (Unreleased)

- **Improvements**
- Adds User-Agent headers to outgoing calls to BossDB (#110)
- Adds the ability to toggle the `public` status of a Boss Resource (#109)
- **Fixes**
- Fixes single-index cutouts in the CloudVolume convenience volume provider (#108)

## v1.4.1 (March 2023)

- **Improvements**
Expand Down
4 changes: 3 additions & 1 deletion intern/service/boss/baseversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from abc import ABCMeta, abstractmethod
from intern.resource.boss.resource import CoordinateFrameResource
from requests import Request
from intern.version import __version__

@six.add_metaclass(ABCMeta)
class BaseVersion(object):
Expand Down Expand Up @@ -87,7 +88,8 @@ def get_headers(self, content_type, token):
"""
return {
'Authorization': 'Token ' + token,
'Content-Type': content_type
'Content-Type': content_type,
'User-Agent': 'intern-py-{}'.format(__version__)
}

def build_url(self, resource, url_prefix, service, req_type='normal'):
Expand Down
Loading