The Wayback Machine - https://web.archive.org/web/20200915094810/https://github.com/kr/secureheader
Skip to content
main
Go to file
Code

Latest 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.

About

Package secureheader adds some HTTP headers widely considered to improve safety of HTTP requests.

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.