gin-contrib/cors
Official CORS gin's middleware observed · 2026-10-15
Health v2 · maintenance only
93/100
- Activity 97
- Release rhythm 84
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 79.0
- age_days: 3998
- days_rel: 29
- days_push: 18
- n_releases_24m: 7
Adoption not part of the score
2000 stars · 195 forks observed · 2026-10-15
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-10-15 · cb571eec5417
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| gin-contrib/cors | main | 93 |
For agents
markdown · JSON · MCP: product_card(name="gin-contrib/cors")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem