Skip to content

yassinouider/heroku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Heroku GoDoc

Package heroku read http headers add by heroku HTTP Routing

Installation

$ go get github.com/yassinouider/heroku

Usage

Show ip and more info from heroku HTTP Routing

func ShowIP(w http.ResponseWriter, r *http.Request) {
  headers := heroku.NewHeaders(r)
  ip := headers.For

  fmt.Fprintf(w, "ip: %s", ip)
}

Middleware force redirect http to https

http.Handle("/" heroku.RedirectToHTTPS(myHandler))

About

Read http headers add by heroku HTTP Routing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages