Skip to content

Commit

Permalink
fixup! Add ui plugin installation as an option
Browse files Browse the repository at this point in the history
  • Loading branch information
wjun committed Aug 27, 2018
1 parent c33d39d commit ce57678
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions installer/fileserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ce57678

Please sign in to comment.