You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This middleware generates a 503 response to display while the server is in maintenance. Optionally, you can provide a Psr\Http\Message\ResponseFactoryInterface used to create the responses. If it's not defined, Middleware\Utils\Factory will be used to detect it automatically.
If known, the length of the downtime in seconds or the estimated date and time when the downtime will be complete. More info about why this
//Retry after 5 minutes$maintenance = (newMiddlewares\Shutdown())->retryAfter(60 * 5);
//You can use also a DateTimeInterface object$maintenance = (newMiddlewares\Shutdown())->retryAfter(newDatetime('+5 minutes'));
render
Use this option to customize the content of the response by providing a callable that returns a string:
//Load a html file$maintenance = (newMiddlewares\Shutdown())->render(function () {
returnfile_get_contents('503.html');
});
Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.
About
PSR-15 middleware to display a 503 maintenance page