diff --git a/Classes/Portachtzig/Neos/Piwik/Controller/Module/PiwikController.php b/Classes/Portachtzig/Neos/Piwik/Controller/Module/PiwikController.php
index 8219440..87208c0 100644
--- a/Classes/Portachtzig/Neos/Piwik/Controller/Module/PiwikController.php
+++ b/Classes/Portachtzig/Neos/Piwik/Controller/Module/PiwikController.php
@@ -90,6 +90,7 @@ public function updateAction(array $piwik)
$settings = $this->configurationSource->load($configurationPath . ConfigurationManager::CONFIGURATION_TYPE_SETTINGS);
$piwik['host'] = preg_replace("(^https?://)", "", $piwik['host']);
$settings = Arrays::setValueByPath($settings, 'Portachtzig.Neos.Piwik.host', $piwik['host']);
+ $settings = Arrays::setValueByPath($settings, 'Portachtzig.Neos.Piwik.protocol', $piwik['protocol']);
$settings = Arrays::setValueByPath($settings, 'Portachtzig.Neos.Piwik.token_auth', $piwik['token_auth']);
if (array_key_exists('idSite', $piwik)) {
$settings = Arrays::setValueByPath($settings, 'Portachtzig.Neos.Piwik.idSite', $piwik['idSite']);
diff --git a/Classes/Portachtzig/Neos/Piwik/Service/Reporting.php b/Classes/Portachtzig/Neos/Piwik/Service/Reporting.php
index b460878..b2abec1 100644
--- a/Classes/Portachtzig/Neos/Piwik/Service/Reporting.php
+++ b/Classes/Portachtzig/Neos/Piwik/Service/Reporting.php
@@ -70,7 +70,7 @@ public function callAPI($piwikMethod, $arguments = array())
}
}
// @todo force https here or throw error ?
- $apiCallUrl = 'https://' . $this->settings['host'] . '/index.php?module=API&format=json&' . $params;
+ $apiCallUrl = $this->settings['protocol'] . '://' . $this->settings['host'] . '/index.php?module=API&format=json&' . $params;
$apiCallUrl .= '&idSite=' . $this->settings['idSite'] . '&token_auth=' . $this->settings['token_auth'];
$this->browser->setRequestEngine($this->browserRequestEngine);
$response = $this->browser->request($apiCallUrl);
@@ -97,7 +97,7 @@ public function getNodeStatistics($node = NULL, $controllerContext = NULL, $argu
}
}
- $apiCallUrl = 'https://' . $this->settings['host'] . '/index.php?module=API&format=json' . $params;
+ $apiCallUrl = $this->settings['protocol'] . '://' . $this->settings['host'] . '/index.php?module=API&format=json' . $params;
$apiCallUrl .= '&pageUrl=' . urlencode($this->getLiveNodeUri($node, $controllerContext)->__toString());
$apiCallUrl .= '&idSite=' . $this->settings['idSite'] . '&token_auth=' . $this->settings['token_auth'];
$this->browser->setRequestEngine($this->browserRequestEngine);
diff --git a/Configuration/Settings.yaml b/Configuration/Settings.yaml
index 6c2deeb..9e7c0fb 100644
--- a/Configuration/Settings.yaml
+++ b/Configuration/Settings.yaml
@@ -3,6 +3,7 @@ Portachtzig:
Neos:
Piwik:
host: ''
+ protocol: 'https'
token_auth: ''
idSite: ''
TYPO3:
diff --git a/Resources/Private/Templates/Module/Piwik/Index.html b/Resources/Private/Templates/Module/Piwik/Index.html
index 2d08136..1ec57b3 100644
--- a/Resources/Private/Templates/Module/Piwik/Index.html
+++ b/Resources/Private/Templates/Module/Piwik/Index.html
@@ -1,18 +1,12 @@
-
-
- Piwik Host Information
-
+
+ Piwik Host Information
-