def _get_server_version(self, headers): server_version = headers.get("server", "") match = VERSION_REGEX.match(server_version) if match is None: self.log.debug("Lighttpd server version is Unknown") return "Unknown" version = int(match.group(1)) self.log.debug("Lighttpd server version is %s" % version) return version
def switch_tenant_in_header(headers): jwt = headers.get('X-Jwt-Assertion-DEV-DEVELOP') return {'X-Jwt-Assertion-TACC-PROD': jwt}