Browse Source
Web app manifest
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
pull/4091/head
Pierre Rudloff
9 years ago
committed by
Morris Jobke
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
3 changed files with
16 additions and
0 deletions
-
core/img/manifest.json
-
core/templates/layout.user.php
-
lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
|
|
|
@ -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" |
|
|
|
} |
|
|
|
@ -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']); ?>
|
|
|
|
|
|
|
|
@ -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 '; |
|
|
|
|