FIX content-security-policy
This commit is contained in:
parent
0ec0a97855
commit
a3d35642ab
2 changed files with 3 additions and 13 deletions
2
http.go
2
http.go
|
@ -36,7 +36,7 @@ func NewMegaUploader(c Config) MegaUploader {
|
||||||
FrameDeny: true,
|
FrameDeny: true,
|
||||||
ContentTypeNosniff: true,
|
ContentTypeNosniff: true,
|
||||||
BrowserXssFilter: true,
|
BrowserXssFilter: true,
|
||||||
ContentSecurityPolicy: "default-src 'self'",
|
ContentSecurityPolicy: "default-src 'self'; img-src 'self' data: ",
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,19 +34,9 @@
|
||||||
|
|
||||||
{{define "scripts"}}
|
{{define "scripts"}}
|
||||||
<script type="text/javascript" src="{{.Prefix}}/static/dropzone/dropzone.min.js"></script>
|
<script type="text/javascript" src="{{.Prefix}}/static/dropzone/dropzone.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript" src="{{.Prefix}}/static/upload.js"> </script>
|
||||||
Dropzone.options.uploadForm = {
|
|
||||||
init: function() {
|
|
||||||
this.on("success", function(file, response) {
|
|
||||||
document.getElementById("responses").textContent += response + "\n";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{define "styles"}}
|
{{define "styles"}}
|
||||||
<link href="{{.Prefix}}/static/dropzone/dropzone.min.css" rel="stylesheet" />
|
<link href="{{.Prefix}}/static/dropzone/dropzone.min.css" rel="stylesheet" />
|
||||||
<style>
|
<link href="{{.Prefix}}/static/style.css" rel="stylesheet" />
|
||||||
.share-description { font-style: italic; }
|
|
||||||
</style>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Reference in a new issue