Skip to content
Merged
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
12 changes: 11 additions & 1 deletion lib/MirrorCache/WebAPI.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2020 SUSE LLC
# Copyright (C) 2020-2025 SUSE LLC
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -143,6 +143,16 @@ sub startup {
$self->plugin('RootRemote');
}
}
# Load Plugins from ENV
foreach (sort keys %ENV) {
my (undef, $plug) = split /MIRRORCACHE_PLUGIN_(.*)/, $_;
next unless $plug;
my $err = 1;
eval { $self->plugin($plug); $err = 0 };
if ($err) {
warn("Could not load plugin from {$plug}: $@\n")
}
}
}

sub _setup_webui {
Expand Down