def METHOD_NAME(self, request):
    if any([request.path.startswith(path) for path in ['/docs', '/static', '/debug-ui']]):
        return True
    # The api key can either be in the headers or as part of the url query
    api_key = request.headers.get('X-Api-Key') or request.query.get('apikey') or request.cookies.get('api_key')
    expected_api_key = self.api_key
    return not expected_api_key or expected_api_key == api_key