rs/cors
Go net/http configurable handler to handle CORS requests observed · 2026-08-28
Health v2 · maintenance only
70/100
- Activity 85
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4330
- days_rel: n/a
- days_push: 90
- n_releases_24m: 0
Adoption not part of the score
2898 stars · 234 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
rs/cors is a Go library providing a configurable net/http handler that implements the Cross Origin Resource Sharing (CORS) W3C specification. It works as middleware for net/http and popular Go routers such as Goji, Martini, Negroni, and Alice.
Use cases
- add CORS headers to a Go HTTP server
- allow cross-origin requests from specific domains in Go
- handle CORS preflight OPTIONS requests
- enable CORS middleware for a Go router like Goji or Negroni
- prevent insecure wildcard origin with credentials configuration
- serve a JSON API consumed by browsers from other origins
When to choose
- you need standards-compliant CORS handling in a Go net/http application
- you want fine-grained control over allowed origins, methods, and headers
- you need a lightweight middleware that integrates with many Go routers
When to avoid
- your server is not written in Go
- you need CORS handled at the reverse proxy or API gateway level instead of application code
- you rely on the removed behavior of reflecting arbitrary origins with credentials enabled
Facets
library · maturity stable
middleware http-server security routing web-development backend apis security go cross-platform cors net-http http-middleware cross-origin-resource-sharing web-server
1 source
- readme: https://github.com/rs/cors · fetched 2026-08-28 · a65d188dea32
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| rs/cors | main | 70 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem