FIX content-security-policy

This commit is contained in:
boyska 2017-12-22 16:45:35 +01:00
parent 0ec0a97855
commit a3d35642ab
2 changed files with 3 additions and 13 deletions

View file

@ -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: ",
}),
}
}

View file

@ -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}}