PhoenixKitWeb.Plugs.MaintenanceMode (phoenix_kit v1.6.16)

View Source

Plug that enforces maintenance mode for non-admin users.

When the Maintenance module is enabled, this plug will:

  • Allow admins and owners to access the site normally
  • Show maintenance page to all other users
  • Work for both LiveView and regular controller routes

Usage

This plug is automatically called by PhoenixKitWeb.Plugs.Integration which is added to your browser pipeline during installation. No manual setup required.

Internal Usage

The Integration plug calls this plug internally to check maintenance mode status.

Summary

Functions

Checks if maintenance mode is enabled and renders maintenance page for non-admin users.

Initializes the plug with options.

Functions

call(conn, opts)

Checks if maintenance mode is enabled and renders maintenance page for non-admin users.

init(opts)

Initializes the plug with options.