PhoenixKitWeb.Plugs.MaintenanceMode (phoenix_kit v1.7.108)

Copy Markdown View Source

Plug that enforces maintenance mode for non-admin users on controller routes.

LiveView routes are handled by the on_mount hook in auth.ex which overrides the layout instead of redirecting. This plug handles the remaining non-LiveView routes (POST actions, OAuth callbacks, etc.) by rendering a 503 maintenance page.

Adds a Retry-After header when a scheduled end time is known.

Summary

Functions

call(conn, opts)

init(opts)