aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/read/switches-management
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/read/switches-management')
-rwxr-xr-xweb/api/read/switches-management8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/api/read/switches-management b/web/api/read/switches-management
index c734eef..b42c84b 100755
--- a/web/api/read/switches-management
+++ b/web/api/read/switches-management
@@ -13,7 +13,13 @@ use Data::Dumper;
my $target = $ENV{REQUEST_URI};
$target =~ s/$ENV{SCRIPT_NAME}//;
$target =~ s/^\///;
-my ($switch, $port) = split(/\//,$target,2);
+my $switch;
+my $port;
+
+if ($target !~ m/now=/) {
+ ($switch, $port) = split(/\//,$target,2);
+}
+
my $q2;
$nms::web::cc{'max-age'} = "5";