From bfbf0d1e78ff47937adb06bce648a0b915c838d1 Mon Sep 17 00:00:00 2001 From: Koert van der Veer Date: Mon, 15 Dec 2014 15:56:13 +0100 Subject: [PATCH] Remove unneeded condition The CName loopkup middleware checked a hostname against the configured domains. This check is likely a remnant from when cname lookup only supported a single hostname. Now, however, the configured domain is actually a list of domains, so checking a single hostname will never match. The check isn't really needed anyway, as it has been broken since swift 1.10. Closes-Bug: #1402704 Change-Id: If9ff345b2c7c6d88f527cae643168bc725b26f8d --- swift/common/middleware/cname_lookup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/swift/common/middleware/cname_lookup.py b/swift/common/middleware/cname_lookup.py index bd3697144b..50a85566b5 100644 --- a/swift/common/middleware/cname_lookup.py +++ b/swift/common/middleware/cname_lookup.py @@ -115,8 +115,6 @@ class CNAMELookupMiddleware(object): port = '' if ':' in given_domain: given_domain, port = given_domain.rsplit(':', 1) - if given_domain == self.storage_domain[1:]: # strip initial '.' - return self.app(env, start_response) if is_ip(given_domain): return self.app(env, start_response) a_domain = given_domain