mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 04:24:07 +00:00
metrix: influx: fix default api_prefix
we set the api prefix by default to '/' so we always triggered the the replacement and added '///' which is wrong and does not work for the 'health' api path (influxdb returns 404 for 'https://ip:port///health') Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
c7777408ea
commit
bc33c73963
@ -172,7 +172,7 @@ sub _get_v2url {
|
||||
my ($cfg, $api_path) = @_;
|
||||
my ($proto, $host, $port) = $cfg->@{qw(influxdbproto server port)};
|
||||
my $api_prefix = $cfg->{'api-path-prefix'} // '/';
|
||||
if ($api_prefix ne '' && $api_prefix =~ m!^/*(.+)/*$!) {
|
||||
if ($api_prefix ne '/' && $api_prefix =~ m!^/*(.+)/*$!) {
|
||||
$api_prefix = "/$1/";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user