Switch ipresolver to always be defined in the storage context

We now use a no-op IP resolver instead of an IF check

Fixes https://jira.prod.coreos.systems/browse/QS-38
This commit is contained in:
Joseph Schorr 2017-10-17 14:29:40 -04:00
parent 5dfa46ed56
commit 8194f5cf72
3 changed files with 27 additions and 3 deletions

View file

@ -622,7 +622,7 @@ class CloudFrontedS3Storage(S3Storage):
resolved_ip_info = None
logger.debug('Got direct download request for path "%s" with IP "%s"', path, request_ip)
if request_ip is not None and self._context.ip_resolver is not None:
if request_ip is not None:
# Lookup the IP address in our resolution table and determine whether it is under AWS.
# If it is, then return an S3 signed URL, since we are in-network.
resolved_ip_info = self._context.ip_resolver.resolve_ip(request_ip)