Registry / web-framework / go-chi-cors

go-chi-cors

JSON →
library1.2.2gogounverified

A net/http handler to handle CORS related requests as defined by the W3C specification.

go get github.com/go-chi/cors
INSTALL
IMPORT
SIG · GO-CHI-CORS
G
go-chi-cors
web-frameworkgov1.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cors
github.com/go-chi/cors

Create a CORS handler wrapping an existing HTTP handler.

package main import ( "net/http" "github.com/go-chi/cors" ) func main() { r := http.NewServeMux() handler := cors.Handler(cors.Options{ AllowedOrigins: []string{"https://example.com"}, })(r) http.ListenAndServe(":8080", handler) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
go-chi-cors — go get go-chi-cors · libregistry