Hello,
The Open Web Application Security Project (OWASP)[1] is "focused on improving the security of software." [I have no affiliation]
The OWASP Top 10[2] are what OWASP believe are to be the 10 most important security vulnerabilities that are exposed in web applications/infrastructure.
The OWASP Zed Attack Proxy (ZAP)[3] is an "integrated
penetration testing tool for finding vulnerabilities in web
applications." It tests to see if a web application exposes any of the OWASP Top 10 vulnerabilities.
I compiled the http file server in the http docs:
https://golang.org/pkg/net/http/#example_FileServer go version go1.4.2 linux/amd64
And ran ZAP against the URL. It found some issues. The report it generated is attached.
It basically was unhappy with 3 headers not being set: X-Frame-Options, X-XSS-Protection, and X-Content-Type-Options, all web security-oriented headers.
Based on this document[4] and the OWASP guidelines[5], I would suggest that the following headers be set with the following values,
as default for the http server implemented in the standard library in Go:
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff[An argument could be made to set
X-Frame-Options: SAMEORIGIN as default]