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:
authorKlaus <klaus@jsxc.org>2019-02-06 14:43:48 +0300
committerGitHub <noreply@github.com>2019-02-06 14:43:48 +0300
commitc1808ce6fb8320e097f48fe051e77678ef1d2a32 (patch)
treeb59f970b256d7a4bc7528e5756c540ebf11e84a9
parent368738a005da74900211ffd0b24babddacd86750 (diff)
parent53a2555c4882f2b67b989e497674482f86f537cc (diff)
Merge pull request #64 from hirschrobert/master
allow non-standard port for piwik/matomo domain,otherwise csp fails
-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)