Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sualko/cloud_piwik.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Hirsch Aspire <info@robert-hirsch.de>2019-01-06 00:14:15 +0300
committerRobert Hirsch Aspire <info@robert-hirsch.de>2019-01-06 00:14:15 +0300
commit53a2555c4882f2b67b989e497674482f86f537cc (patch)
tree592491023b70cd66a33615a68dbeac994d23dc68
parent6e556f51bcc39a8d9da385872637e3edd96fbe20 (diff)
allow non-standard port for piwik/matomo domain,otherwise csp fails
Signed-off-by: Robert Hirsch <info@robert-hirsch.de>
-rwxr-xr-xappinfo/app.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 44b441c..eeffecb 100755
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -10,7 +10,11 @@ if (!empty($url)) {
], ''
);
- $url = parse_url($url, PHP_URL_HOST);
+ $parseurl = parse_url($url);
+ $url = $parseurl['host'];
+ if (isset($parseurl['port'])) {
+ $url .= ':' . (string) $parseurl['port'];
+ }
$policy = new OCP\AppFramework\Http\ContentSecurityPolicy();
if ($url !== false && array_key_exists('HTTP_HOST', $_SERVER)