summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Rudloff <contact@rudloff.pro>2016-09-20 17:24:29 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-03-28 18:39:57 -0600
commit19d3133ccf014f21ef238a045dd9cdbc49e78fb4 (patch)
treef2d606f4f8795be906f0e98773e862324f56ffba
parent4f09dc71e0902a693ccb9c59a9ea6b1f258eefa1 (diff)
downloadnextcloud-server-19d3133ccf014f21ef238a045dd9cdbc49e78fb4.tar.gz
nextcloud-server-19d3133ccf014f21ef238a045dd9cdbc49e78fb4.zip
Web app manifest
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
-rw-r--r--core/img/manifest.json14
-rw-r--r--core/templates/layout.user.php1
-rw-r--r--lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php1
3 files changed, 16 insertions, 0 deletions
diff --git a/core/img/manifest.json b/core/img/manifest.json
new file mode 100644
index 00000000000..fcecb856614
--- /dev/null
+++ b/core/img/manifest.json
@@ -0,0 +1,14 @@
+{
+ "name": "Nextcloud",
+ "start_url": "../../",
+ "icons": [{
+ "src": "favicon-touch.png",
+ "type": "image/png",
+ "sizes": "128x128"
+ }, {
+ "src": "favicon-mask.svg",
+ "type": "image/svg+xml",
+ "sizes": "16x16"
+ }],
+ "display": "standalone"
+}
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 31a5a1764f1..439567fe6a1 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -20,6 +20,7 @@
<link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getMailHeaderColor()); ?>">
+ <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>">
<?php if (isset($_['inline_ocjs'])): ?>
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" type="text/javascript">
<?php print_unescaped($_['inline_ocjs']); ?>
diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
index c53b5b2146c..09eb5a1c151 100644
--- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
+++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
@@ -336,6 +336,7 @@ class EmptyContentSecurityPolicy {
public function buildPolicy() {
$policy = "default-src 'none';";
$policy .= "base-uri 'none';";
+ $policy .= "manifest-src 'self';";
if(!empty($this->allowedScriptDomains) || $this->inlineScriptAllowed || $this->evalScriptAllowed) {
$policy .= 'script-src ';