mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
WebClient: add csp nonce to CodeMirror
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
2
static/vendor/codemirror/cm6.bundle.min.js
vendored
2
static/vendor/codemirror/cm6.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -156,8 +156,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
//{{- if .ReadOnly}}
|
//{{- if .ReadOnly}}
|
||||||
options.readOnly = true;
|
options.readOnly = true;
|
||||||
//{{- end}}
|
//{{- end}}
|
||||||
cmView = cm6.createEditorView(undefined, document.getElementById("editor"));
|
//{{- if .CSPNonce}}
|
||||||
cmView.setState(cm6.createEditorState("{{.Data}}", options));
|
options.cspNonce = "{{.CSPNonce}}";
|
||||||
|
//{{- end}}
|
||||||
|
let editorState = cm6.createEditorState("{{.Data}}", options);
|
||||||
|
cmView = cm6.createEditorView(editorState, document.getElementById("editor"));
|
||||||
|
|
||||||
var saveBtn = $('#save_button');
|
var saveBtn = $('#save_button');
|
||||||
if (saveBtn){
|
if (saveBtn){
|
||||||
|
|||||||
Reference in New Issue
Block a user