Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
attachment: set CSP header in the serving endpoint (#6926)
  • Loading branch information
unknwon committed May 5, 2022
1 parent 2a8f561 commit bc77440
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/cmd/web.go
Expand Up @@ -314,6 +314,7 @@ func runWeb(c *cli.Context) error {
}
defer fr.Close()

c.Header().Set("Content-Security-Policy", "default-src 'none'; style-src 'unsafe-inline'; sandbox")
c.Header().Set("Cache-Control", "public,max-age=86400")
c.Header().Set("Content-Disposition", fmt.Sprintf(`inline; filename="%s"`, attach.Name))

Expand Down

0 comments on commit bc77440

Please sign in to comment.