Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLatest commit
This function signature makes it easier to do the most
common usage patterns I'm aware of, after several years
of seeing this package used in the wild.
http.Handle("/", secureheader.Handler(mux))
and
http.Handle("/a", a)
http.Handle("/b", b)
http.ListenAndServe(addr, secureheader.Handler(nil))
and
var h http.Handler
h = mux
h = middleware3(h)
h = secureheader.Handler(h)
h = middleware1(h)
http.ListenAndServe(addr, h)
9ede934
Git stats
Files
Permalink
Failed to load latest commit information.
Readme
Package secureheader adds some HTTP header fields widely considered to improve safety of HTTP requests. See http://godoc.org/github.com/kr/secureheader for more. Contributions from web application platforms are encouraged. If you have different default behavior that would make better sense in your environment, send a pull request! See heroku.go for an example.