cloudsuite: add showLOleaflet method
This commit is contained in:
parent
6354b2aa2c
commit
7f7c41fb56
@ -206,4 +206,29 @@ class DocumentController extends Controller{
|
|||||||
'status' => 'success', 'documents' => $documents,'sessions' => $sessions,'members' => $members
|
'status' => 'success', 'documents' => $documents,'sessions' => $sessions,'members' => $members
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @PublicPage
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*
|
||||||
|
* @return TemplateResponse
|
||||||
|
*/
|
||||||
|
public function showLOleaflet() {
|
||||||
|
$params = [
|
||||||
|
'urlGenerator' => $this->urlGenerator
|
||||||
|
];
|
||||||
|
$response = new TemplateResponse($this->appName, '3rdparty/cloudsuite/assets/cloudsuite', $params, 'blank');
|
||||||
|
|
||||||
|
$policy = new ContentSecurityPolicy();
|
||||||
|
$policy->addAllowedChildSrcDomain('\'self\' http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js \'unsafe-eval\'');
|
||||||
|
$policy->addAllowedScriptDomain('\'self\' http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js \'unsafe-eval\'');
|
||||||
|
$policy->addAllowedFrameDomain('\'self\' http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.12/jquery.mousewheel.min.js \'unsafe-eval\'');
|
||||||
|
$policy->addAllowedConnectDomain('ws://' . $_SERVER['SERVER_NAME'] . ':9980');
|
||||||
|
$policy->addAllowedImageDomain('*');
|
||||||
|
$policy->allowInlineScript(true);
|
||||||
|
$policy->addAllowedFontDomain('data:');
|
||||||
|
$response->setContentSecurityPolicy($policy);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user