1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 06:39:43 +02:00
documize/vendor/github.com/gorilla/handlers
HarveyKandola 4fe022aa0c Database and LDAP upgrades
Bumped underlying dependencies affecting database and LDAP connectivity.

Bumped to Go v1.14.3 and released v3.8.0.
2020-05-21 12:32:46 +01:00
..
canonical.go Improve reverse proxy support 2019-04-11 14:45:36 +01:00
compress.go Database and LDAP upgrades 2020-05-21 12:32:46 +01:00
cors.go Database and LDAP upgrades 2020-05-21 12:32:46 +01:00
doc.go Improve reverse proxy support 2019-04-11 14:45:36 +01:00
go.mod Database and LDAP upgrades 2020-05-21 12:32:46 +01:00
handlers.go Improve reverse proxy support 2019-04-11 14:45:36 +01:00
handlers_go18.go Database and LDAP upgrades 2020-05-21 12:32:46 +01:00
handlers_pre18.go Improve reverse proxy support 2019-04-11 14:45:36 +01:00
LICENSE Improve reverse proxy support 2019-04-11 14:45:36 +01:00
logging.go Database and LDAP upgrades 2020-05-21 12:32:46 +01:00
proxy_headers.go Database and LDAP upgrades 2020-05-21 12:32:46 +01:00
README.md Database and LDAP upgrades 2020-05-21 12:32:46 +01:00
recovery.go Improve reverse proxy support 2019-04-11 14:45:36 +01:00

gorilla/handlers

GoDoc CircleCI Sourcegraph

Package handlers is a collection of handlers (aka "HTTP middleware") for use with Go's net/http package (or any framework supporting http.Handler), including:

Other handlers are documented on the Gorilla website.

Example

A simple example using handlers.LoggingHandler and handlers.CompressHandler:

import (
    "net/http"
    "github.com/gorilla/handlers"
)

func main() {
    r := http.NewServeMux()

    // Only log requests to our admin dashboard to stdout
    r.Handle("/admin", handlers.LoggingHandler(os.Stdout, http.HandlerFunc(ShowAdminDashboard)))
    r.HandleFunc("/", ShowIndex)

    // Wrap our server with our gzip handler to gzip compress all responses.
    http.ListenAndServe(":8000", handlers.CompressHandler(r))
}

License

BSD licensed. See the included LICENSE file for details.