Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2019-08-17 18:31:58 +0300
committerPhie <phie@phie.ovh>2019-08-17 18:31:58 +0300
commit256774c2de59b5190ed49637776636fe44522da9 (patch)
tree614b96fd4e1f2b772b83df5ed4edaf6ce393d42b /templates
parent5e4a3a27430ab49517b365e120ca7bc2253eb2de (diff)
real template + cache for writer
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/writer.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/writer.php b/templates/writer.php
index 56eec7a..18a22d1 100755
--- a/templates/writer.php
+++ b/templates/writer.php
@@ -30,6 +30,10 @@ $file = str_replace("<!ROOTPATH>", $root."/CarnetElectron/", $file);
$root = substr(__DIR__, strlen($_SERVER['DOCUMENT_ROOT']));
$urlGenerator = \OC::$server->getURLGenerator();
$file = str_replace("<!ROOTURL>", $root."/CarnetElectron/", $file);
+if (method_exists(\OC::$server, "getContentSecurityPolicyNonceManager")){
+ $nonce = \OC::$server->getContentSecurityPolicyNonceManager()->getNonce();
+ $file = str_replace("src=\"","defer nonce='".$nonce."' src=\"",$file);
+}
$file = str_replace("<!APIURL>", parse_url($urlGenerator->linkToRouteAbsolute("carnet.page.index"), PHP_URL_PATH), $file);
echo $file;