def match_content_type(filename: str) -> str:
    """
    Match file extensions to content-type. A quick lightweight list.
    This is needed so s3 vends the right MIME type when the file is downloaded
    directly from the bucket.
    """
    content_type_match = {
        'json': 'application/json',
        'js': 'application/javascript',
        'css': 'text/css',
        'map': 'application/json',
        'svg': 'image/svg+xml',
        'ttf': 'font/ttf',
        'woff': 'font/woff',
        'woff2': 'font/woff2',
        'eot': 'application/vnd.ms-fontobject',
        'txt': 'text/plain',
        'png': 'image/png',
        'jpg': 'image/jpeg',
        'ico': 'image/x-icon',
        'html': 'text/html',
        'gif': 'image/gif'
    }
    
    try:
        return content_type_match[filename.rsplit('.', 1)[1]]
    except KeyError:
        return 'application/octet-stream'