def METHOD_NAME():
    """Force user to redirect to https, checking X-Forwarded-Proto."""
    if request.headers.get('X-Forwarded-Proto') == 'http':
        return redirect('https://' + request.headers['Host'] +
                        request.headers['X-Original-URI'],
                        code=301)