diff --git a/CHANGELOG b/CHANGELOG
index ac4f6432cd..290ebaf9f8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,6 +23,7 @@ Cacti CHANGELOG
-issue#2632: Automated Network Scans are Not Working
-issue#2635: Multiple Database Sync Issues in v1.2.x
-issue#2638: Support disabling PHP SNMP extension
+-issue#2645: The cacti setting 'base_url' may be incorrect for some systems. Correct it.
1.2.3
-issue#1063: Tree View does not display the last item correctly under 'Modern' theme
diff --git a/lib/reports.php b/lib/reports.php
index 1ceaa2fe42..628fd4c2c3 100644
--- a/lib/reports.php
+++ b/lib/reports.php
@@ -853,7 +853,17 @@ function reports_graph_image($report, $item, $timespan, $output, $theme = 'class
}
if ($report['graph_linked'] == 'on' ) {
- $out = "" . $out . '';
+ if (substr(read_config_option('base_url'), 0, 4) != 'http') {
+ if (read_config_option('force_https') == 'on') {
+ $prefix = 'https://';
+ } else {
+ $prefix = 'http://';
+ }
+
+ set_config_option('base_url', $prefix . read_config_option('base_url'));
+ }
+
+ $out = "" . $out . '';
}
return $out . PHP_EOL;