def get_token(request):
    """Get token from cookie or header."""
    token = request.COOKIES.get('jwt-token')
    if token is None:
        token = request.META.get('HTTP_AUTHORIZATION')
    return token