Skip to content

Commit

Permalink
Merge tag '0.40.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
felliott committed Jul 25, 2018
2 parents 3984900 + 4ac4668 commit 3627806
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
ChangeLog
*********

0.40.1 (2018-07-25)
===================
- Feature: Add `X-CSRFToken` to list of acceptable CORS headers.
- Feature: Tell Keen analytics to strip ip on upload.
- Code: Remove never-implemented anonymous geolocation code.

0.40.0 (2018-06-22)
===================
- Feature: Listen for MFR-originating metadata requests and relay the nature of the request to
Expand Down
3 changes: 0 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ xmltodict==0.9.0

# Issue: certifi-2015.9.6.1 and 2015.9.6.2 fail verification (https://github.com/certifi/python-certifi/issues/26)
certifi==2015.4.28

# Analytics requirements
python-geoip-geolite2==2015.0303
14 changes: 5 additions & 9 deletions waterbutler/core/remote_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import furl
import aiohttp
# from geoip import geolite2

from waterbutler import settings
from waterbutler.core import utils
Expand Down Expand Up @@ -80,10 +79,6 @@ async def log_to_keen(action, api_version, request, source, destination=None, er
if settings.KEEN_PRIVATE_PROJECT_ID is None:
return

location = None
# if request['ip'] and re.match('\d+\.\d+\.\d+\.\d+', request['ip']): # needs IPv4 format
# location = geolite2.lookup(request['ip'])

keen_payload = {
'meta': {
'wb_version': __version__,
Expand All @@ -92,9 +87,9 @@ async def log_to_keen(action, api_version, request, source, destination=None, er
},
'request': request['request'], # .info added via keen addons
'tech': request['tech'], # .info added via keen addons
'anon': {
'continent': getattr(location, 'continent', None),
'country': getattr(location, 'country', None),
'anon': { # intended for anonymized geolocation, never implemented
'continent': None,
'country': None,
},
'action': {
'type': action,
Expand Down Expand Up @@ -130,7 +125,8 @@ async def log_to_keen(action, api_version, request, source, destination=None, er
{ # private
'name': 'keen:ip_to_geo',
'input': {
'ip': 'tech.ip'
'ip': 'tech.ip',
'remove_ip_property': True,
},
'output': 'geo',
},
Expand Down
1 change: 1 addition & 0 deletions waterbutler/server/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'Authorization',
'Cache-Control',
'X-Requested-With',
'X-CSRFToken',
]

CORS_EXPOSE_HEADERS = [
Expand Down
2 changes: 1 addition & 1 deletion waterbutler/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.40.0'
__version__ = '0.40.1'

0 comments on commit 3627806

Please sign in to comment.