gin-contrib/cors
Official CORS gin's middleware observed · 2026-08-28
Health v2 · maintenance only
87/100
- Activity 99
- Release rhythm 65
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 79.0
- age_days: 3950
- days_rel: 158
- days_push: 9
- n_releases_24m: 5
Adoption not part of the score
1999 stars · 188 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
The official CORS (Cross-Origin Resource Sharing) middleware for the Gin web framework in Go. It provides configurable handling of allowed origins, methods, headers, credentials, and preflight caching for Gin-based HTTP APIs.
Use cases
- enable CORS on a Gin API server
- allow requests from a specific frontend origin
- handle preflight OPTIONS requests in Go
- configure credentialed cross-origin requests
- restrict allowed HTTP methods and headers cross-origin
- add CORS headers to a REST API written in Go
When to choose
- you use the Gin framework and need CORS support
- you want a small, well-maintained, configurable CORS middleware
- you need custom origin validation logic in Go
When to avoid
- your server does not use Gin
- you need CORS for a non-Go stack
- you need a general-purpose HTTP middleware framework rather than CORS specifically
Facets
library · maturity stable
middleware http-server security web-framework web-development backend apis security go windows cross-platform cors gin cross-origin-resource-sharing http-middleware api-security linux macos
1 source
- readme: https://github.com/gin-contrib/cors · fetched 2026-08-28 · cb571eec5417
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| gin-contrib/cors | main | 87 |
For agents
markdown · JSON · MCP: product_card(name="gin-contrib/cors")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem