Open TriMoon opened 6 years ago
Ugh it needs to be in ALL generated html files.
I will be resorting to generating the header in a .htaccess file instead...
Below are the files i'm using now. [Click the arrowed-line to (un)hide]
My docs with esdoc reside in a EsDocs
and jsdoc reside in a JsDocs
directories respectively.
To aid in Content Security Policy (CSP) usage by the generated output When using a Apache webserver, you should add these lines in a file named "index.html.meta" and place it alongside the index.html file generated by esdoc" (Alternatively you could also put it inside a "esdoc.meta" file somewhere else and link to it using correct names in-case it is needed by more than one file...)
Content-Security-Policy-Report-Only:
will disable your server-wide report-only policy if you are usingHeader setifempty Content-Security-Policy-Report-Only
somewhere in the server configs, like i am. You can skip it/remove it if you don't make use of that functionality.report-uri /server-cgi/csp-violation;
should point to your own script that collects csp-violations. You can leave it as-is, to make your browser perform violation reporting. (The script can be an empty file also, just eliminate a 404 from Apache)The values on the 2nd line could also be put inside the head of the html file with a
<meta http-equiv="Content-Security-Policy" content="...">
tag, but you won't be allowed to use the reporting functionality in that case. Besides the server-generated header will take precedence over the one inside a served document. Anyway the file to modify would be between L4-L5 ofesdoc-publish-html-plugin/out/src/Builder/template/layout.html
Hope this info will be useful to anyone :+1: