The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mojolicious::Plugin::Status - Mojolicious server status

SYNOPSIS

  # Mojolicious
  $self->plugin('Status');

  # Mojolicious::Lite
  plugin 'Status';

  # Secure access to the server status ui with Basic authentication
  my $under = $self->routes->under('/status' =>sub {
    my $c = shift;
    return 1 if $c->req->url->to_abs->userinfo eq 'Bender:rocks';
    $c->res->headers->www_authenticate('Basic');
    $c->render(text => 'Authentication required!', status => 401);
    return undef;
  });
  $self->plugin('Status' => {route => $under});

DESCRIPTION

L is a L plugin providing a server status ui for L and L. Very useful for debugging. OPTIONS

L supports the following options. return_to

# Mojolicious::Lite plugin Status => {return_to => 'some_route'}; Name of route or path to return to when leaving the server status ui, defaults to C. route

# Mojolicious::Lite plugin Status => {route => app->routes->any('/status')}; L object to attach the server status ui to, defaults to generating a new one with the prefix C. shm_key

# Mojolicious::Lite plugin Status => {shm_key => 1234}; Shared memory key to use with L, defaults to C<1234>. METHODS

L inherits all methods from L and implements the following new ones. register

my $route = $plugin->register(Mojolicious->new); Register renderer and helper in L application. BUNDLED FILES

The L distribution includes a few files with different licenses that have been bundled for internal use. Artwork

Copyright (C) 2018, Sebastian Riedel. Licensed under the CC-SA License, Version 4.0 L. Bootstrap

Copyright (C) 2011-2018 The Bootstrap Authors. Licensed under the MIT License, L. Font Awesome

Copyright (C) Dave Gandy. Licensed under the MIT License, L, and the SIL OFL 1.1, L. AUTHOR

Sebastian Riedel, C. COPYRIGHT AND LICENSE

Copyright (C) 2018, Sebastian Riedel and others. This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0. SEE ALSO

L, L, L.