1
0
Fork 0

Create Header Middleware

This commit is contained in:
Daniel Tomcej 2017-06-12 18:48:21 -06:00 committed by Ludovic Fernandez
parent aea7bc0c07
commit f275e4ad3c
12 changed files with 592 additions and 3 deletions

25
vendor/github.com/unrolled/secure/doc.go generated vendored Normal file
View file

@ -0,0 +1,25 @@
/*Package secure is an HTTP middleware for Go that facilitates some quick security wins.
package main
import (
"net/http"
"github.com/unrolled/secure" // or "gopkg.in/unrolled/secure.v1"
)
var myHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("hello world"))
})
func main() {
secureMiddleware := secure.New(secure.Options{
AllowedHosts: []string{"www.example.com", "sub.example.com"},
SSLRedirect: true,
})
app := secureMiddleware.Handler(myHandler)
http.ListenAndServe("127.0.0.1:3000", app)
}
*/
package secure