From ce57678808a784b57d11cfaae1cda1961d8323a1 Mon Sep 17 00:00:00 2001 From: wjun Date: Mon, 27 Aug 2018 18:21:04 +0800 Subject: [PATCH] fixup! Add ui plugin installation as an option --- installer/fileserver/main.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/installer/fileserver/main.go b/installer/fileserver/main.go index 974c07d9a5..76e1114b5d 100644 --- a/installer/fileserver/main.go +++ b/installer/fileserver/main.go @@ -140,14 +140,14 @@ func parseServerConfig(op trace.Operation, conf *serverConfig) { // cspMiddleware sets the Content-Security-Policy header to prevent clickjacking // https://www.owasp.org/index.php/Content_Security_Policy_Cheat_Sheet#Preventing_Clickjacking func cspMiddleware() func(next http.Handler) http.Handler { - header := "Content-Security-Policy" - value := "frame-ancestors 'none';" - return func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Add(header, value) - next.ServeHTTP(w, r) - }) - } + header := "Content-Security-Policy" + value := "frame-ancestors 'none';" + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Add(header, value) + next.ServeHTTP(w, r) + }) + } } func main() {