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,
|
||||
ContentTypeNosniff: true,
|
||||
BrowserXssFilter: true,
|
||||
ContentSecurityPolicy: "default-src 'self'",
|
||||
ContentSecurityPolicy: "default-src 'self'; img-src 'self' data: ",
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,19 +34,9 @@
|
|||
|
||||
{{define "scripts"}}
|
||||
<script type="text/javascript" src="{{.Prefix}}/static/dropzone/dropzone.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
Dropzone.options.uploadForm = {
|
||||
init: function() {
|
||||
this.on("success", function(file, response) {
|
||||
document.getElementById("responses").textContent += response + "\n";
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="{{.Prefix}}/static/upload.js"> </script>
|
||||
{{end}}
|
||||
{{define "styles"}}
|
||||
<link href="{{.Prefix}}/static/dropzone/dropzone.min.css" rel="stylesheet" />
|
||||
<style>
|
||||
.share-description { font-style: italic; }
|
||||
</style>
|
||||
<link href="{{.Prefix}}/static/style.css" rel="stylesheet" />
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in a new issue