Skip to content

Commit

Permalink
Add user-agent to outgoing BossDB remote calls (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
j6k4m8 authored Nov 28, 2023
1 parent 9d45c67 commit 15073c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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

0 comments on commit 15073c6

Please sign in to comment.