From 132803dbcb60734b73c8d07411513ab1b5da41b1 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 4 Feb 2019 11:11:07 -0800 Subject: [PATCH] Include webprefix in webmin paths --- servers/link.cgi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/servers/link.cgi b/servers/link.cgi index d8ec32e35..42643d3ec 100755 --- a/servers/link.cgi +++ b/servers/link.cgi @@ -108,9 +108,10 @@ my $http_prot = $ENV{'HTTPS'} eq "ON" ? "https" : "http"; $http_prot, $http_host, $http_port, $tconfig{'inframe'} ? "" : "$module_name/")); &write_http_connection($con, sprintf( - "Webmin-path: %s://%s:%d/%s/link.cgi%s\n", + "Webmin-path: %s://%s:%d%s/%s/link.cgi%s\n", $http_prot, $http_host, $http_port, - $module_name, $ENV{'PATH_INFO'})); + $gconfig{'webprefix'}, $module_name, + $ENV{'PATH_INFO'})); if ($ENV{'HTTP_WEBMIN_PATH'}) { &write_http_connection($con, sprintf( "Complete-webmin-path: %s%s\n", @@ -118,9 +119,10 @@ if ($ENV{'HTTP_WEBMIN_PATH'}) { } else { &write_http_connection($con, sprintf( - "Complete-webmin-path: %s://%s:%d/%s/link.cgi%s\n", + "Complete-webmin-path: %s://%s:%d%s/%s/link.cgi%s\n", $http_prot, $http_host, $http_port, - $module_name, $ENV{'PATH_INFO'})); + $gconfig{'webprefix'}, $module_name, + $ENV{'PATH_INFO'})); } my $cl = $ENV{'CONTENT_LENGTH'}; &write_http_connection($con, "Content-length: $cl\r\n") if ($cl);