示例#1
0
        public async Task <IActionResult> Shutdown()
        {
            if (!IsLocalRequest(HttpContext.Request))
            {
                return(StatusCode(403));
            }

            if (_shutdownManager.InProgress)
            {
                return(StatusCode(409));
            }

            _log.LogWarning("Starting shutdown process");
            await _shutdownManager.ShutdownAsync();

            return(Ok());
        }