gorilla/handlers

Package gorilla/handlers is a collection of useful middleware for Go HTTP services & web applications 🛃

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 38 minutes ago
Added to GitGenius on April 8th, 2021
Created on February 1st, 2013
Open Issues & Pull Requests: 26 (+0)
Number of forks: 285
Total Stargazers: 1,742 (+0)
Total Subscribers: 27 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 13.2 days
Mean response time: 330.0 days
90th percentile: 802.3 days
Tracked items: 4

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 15
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,052 days
Stale 30+ days: 15
Stale 90+ days: 15

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • stale (36)
  • bug (30)
  • question (21)
  • enhancement (17)
  • help wanted (6)
  • breaking change (2)
  • wontfix (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

The gorilla/handlers repository is a Go package that provides a collection of middleware components designed for use with Go's standard net/http package and any framework that supports the http.Handler interface. As part of the broader Gorilla web toolkit, this package addresses common HTTP handling requirements that developers encounter when building web services and applications in Go.

The package includes several key middleware handlers that cover essential HTTP operations. LoggingHandler enables logging of HTTP requests in Apache Common Log Format, while CombinedLoggingHandler provides logging in the Apache Combined Log Format, which is the standard format used by both Apache and nginx web servers. For performance optimization, CompressHandler automatically gzips HTTP responses to reduce bandwidth usage. ContentTypeHandler validates incoming requests against a whitelist of accepted content types, helping enforce API contracts. MethodHandler allows developers to route requests to different handlers based on HTTP methods using a simple map structure. ProxyHeaders middleware handles the common scenario of servers running behind reverse proxies by populating the RemoteAddr and URL.Scheme fields based on standard proxy headers including X-Forwarded-For, X-Real-IP, X-Forwarded-Proto, and RFC7239 Forwarded headers. CanonicalHost provides domain redirection functionality for applications handling multiple domain aliases. RecoveryHandler protects applications by gracefully recovering from unexpected panics during request handling.

The repository maintains active development with continuous integration testing and code coverage tracking through Codecov. Bug reports represent the most frequently tracked issue label with two recorded instances.

The package is distributed under a BSD license and is documented both through inline GoDoc annotations and on the official Gorilla website. The repository includes automated testing workflows and maintains public visibility through Sourcegraph integration, making it accessible for developers seeking to understand or contribute to the codebase.