def allow_public_endpoints_only(): public_endpoints = (HealthCheck.__name__.lower(),) if g.endpoint not in public_endpoints: abort(401)