diff --git a/Makefile b/Makefile index 393e6e8..711830f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC=go -BUILD=build -v +BUILD=build -v -trimpath VERSION=$(shell cat VERSION) GCFLAGS=-gcflags 'all=-e' LDFLAGS=-ldflags '-X main.version=$(VERSION) -s -w' diff --git a/go.mod b/go.mod index 51040d9..87aa70d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module git.giftfish.de/ston1th/docstore -go 1.12 +go 1.13 require ( git.giftfish.de/ston1th/authdav v1.1.0 diff --git a/pkg/server/handler.go b/pkg/server/handler.go index 85f0589..0ae283b 100644 --- a/pkg/server/handler.go +++ b/pkg/server/handler.go @@ -170,6 +170,7 @@ func rawHandler(ctx *Context) { } return } + ctx.Response.Header().Del("Content-Security-Policy") http.ServeContent(ctx.Response, ctx.Request, fi.Name(), fi.ModTime(), f) } diff --git a/pkg/server/templates.go b/pkg/server/templates.go index 1774ec4..19cc578 100644 --- a/pkg/server/templates.go +++ b/pkg/server/templates.go @@ -162,7 +162,7 @@ const ( {{end}}
- +
{{end}}` forbidden = `{{define "body"}} @@ -188,7 +188,7 @@ const ( DocStore | {{.Title}} - + @@ -833,6 +833,8 @@ code { } embed { background-color: #999999; + width: 100%; + height: 700px; } textarea,input,select { color: #e2e2e2 !important; diff --git a/templates/custom.css b/templates/custom.css index 2b564f8..66d1622 100644 --- a/templates/custom.css +++ b/templates/custom.css @@ -106,6 +106,8 @@ code { } embed { background-color: #999999; + width: 100%; + height: 700px; } textarea,input,select { color: #e2e2e2 !important; diff --git a/templates/file.html b/templates/file.html index 2931b3e..d19c91f 100644 --- a/templates/file.html +++ b/templates/file.html @@ -35,6 +35,6 @@ {{end}}
- +
{{end}} diff --git a/templates/index.html b/templates/index.html index 17005b7..ca1fe81 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,7 @@ DocStore | {{.Title}} - +