Example #1
0
    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
Example #2
0
    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
Example #3
0
def switch_tenant_in_header(headers):
    jwt = headers.get('X-Jwt-Assertion-DEV-DEVELOP')
    return {'X-Jwt-Assertion-TACC-PROD': jwt}