diff options
author | Robert Hirsch Aspire <info@robert-hirsch.de> | 2019-01-06 00:14:15 +0300 |
---|---|---|
committer | Robert Hirsch Aspire <info@robert-hirsch.de> | 2019-01-06 00:14:15 +0300 |
commit | 53a2555c4882f2b67b989e497674482f86f537cc (patch) | |
tree | 592491023b70cd66a33615a68dbeac994d23dc68 | |
parent | 6e556f51bcc39a8d9da385872637e3edd96fbe20 (diff) |
allow non-standard port for piwik/matomo domain,otherwise csp fails
Signed-off-by: Robert Hirsch <info@robert-hirsch.de>
-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) |