Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/LANraragi/Utils/Routing.pm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ sub apply_routes {
$public_routes->get('/logout')->to('login#logout');

# Routers for routes that require auth
my $logged_in = $public_routes->under('/')->to('login#logged_in');
my $logged_in = $public_routes->under('/')->to('login#logged_in');
my $logged_in_api = $public_routes->under('/')->to('login#logged_in_api');

# No-Fun Mode locks the base routes behind login as well
if ( $self->LRR_CONF->enable_nofun ) {
Expand Down Expand Up @@ -134,7 +135,7 @@ sub apply_routes {

# Metrics API (not part of OpenAPI spec, serves Prometheus format)
if ( $self->LRR_CONF->enable_metrics ) {
$public_routes->get('/api/info/metrics')->to('api-metrics#serve_metrics');
$logged_in_api->get('/api/info/metrics')->to('api-metrics#serve_metrics');
}

$search_api->get('/search')->to('api-search#handle_datatables');
Expand Down
Loading