1<?php
2
3namespace dokuwiki\plugin\diagrams;
4
5/**
6 * Currently only used to hold constants
7 */
8class Diagrams
9{
10    const MODE_MEDIA = 1;
11    const MODE_EMBED = 2;
12
13    const CSP = [
14        'default-src' => "'none'",
15        'style-src' => "'unsafe-inline' fonts.googleapis.com",
16        'media-src' => "'self'",
17        'object-src' => "'self'",
18        'font-src' => "'self' data: fonts.gstatic.com",
19        'form-action' => "'none'",
20        'frame-ancestors' => "'self'",
21        'img-src' => "self data:",
22        'sandbox' => "allow-popups allow-popups-to-escape-sandbox allow-top-navigation allow-same-origin",
23    ];
24
25    const CACHE_EXT = '.diagrams.png';
26}
27