diff options
author | Klaus <klaus@jsxc.org> | 2019-02-06 14:43:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-06 14:43:48 +0300 |
commit | c1808ce6fb8320e097f48fe051e77678ef1d2a32 (patch) | |
tree | b59f970b256d7a4bc7528e5756c540ebf11e84a9 | |
parent | 368738a005da74900211ffd0b24babddacd86750 (diff) | |
parent | 53a2555c4882f2b67b989e497674482f86f537cc (diff) |
Merge pull request #64 from hirschrobert/master
allow non-standard port for piwik/matomo domain,otherwise csp fails
-rwxr-xr-x | appinfo/app.php | 6 |
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) |