# gorilla/handlers

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

Repository: https://github.com/gorilla/handlers
Canonical: https://ross.abutalabs.com/products/handlers
Homepage: https://gorilla.github.io
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: go, gorilla, middleware, http, handler, golang, gorilla-web-toolkit
Last push: 2024-02-20T16:27:20+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4961, "days_push": 925, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1741, forks 284 (observed 2026-08-28T04:05:30.223797+00:00)

## What it is
gorilla/handlers is a collection of HTTP middleware for Go's net/http package, part of the Gorilla web toolkit. It provides composable handlers for logging, gzip compression, content-type validation, method routing, proxy header handling, canonical host redirects, and panic recovery.

## Use cases
- log http requests in apache common or combined log format
- gzip compress http responses in a go server
- recover from panics in http handlers
- handle x-forwarded-for headers behind a reverse proxy
- restrict endpoints to specific http methods
- validate request content types
- redirect alternate domains to a canonical host

## When to choose
- you use net/http or any http.Handler-compatible Go framework and need standard middleware
- you want small, composable, dependency-light middleware utilities
- you need battle-tested request logging or compression middleware

## When to avoid
- you need a full web framework with routing, sessions, and templating built in
- you want structured JSON logging rather than Apache-style log formats
- your framework already ships equivalent middleware

## Facets
- artifact type: library
- maturity: stable
- function: middleware, logging, http-server, web-framework
- domain: web-development, backend, developer-tools
- platform: go, windows, cross-platform
- tags: http-middleware, gorilla-toolkit, net-http, gzip-compression, request-logging, panic-recovery, reverse-proxy, linux, macos

## Member repositories
- gorilla/handlers (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:30.223797+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:30:02.579925+00:00, confidence not recorded.
  - readme: https://github.com/gorilla/handlers (fetched 2026-08-28T04:05:30.223797+00:00, sha 405ad8861f9a)
  - homepage: https://gorilla.github.io (fetched 2026-08-29T11:07:24.079711+00:00, sha aa93940b2bb1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
