Dmitriy Gnatenko 75d5d8e157 Update CORS middleware 4 ヶ月 前
..
cors.go 75d5d8e157 Update CORS middleware 4 ヶ月 前
cors_config.go 45e7f4e539 Add CORS middleware 4 ヶ月 前
readme.md 75d5d8e157 Update CORS middleware 4 ヶ月 前

readme.md

Usage example

mux := http.NewServeMux()

config := cors.NewConfig(
    cors.WithOrigin("test.com"),
    cors.WithMethods("GET,POST"),        
)

srv = &http.Server{
    Addr:    ":8080",
    Handler: cors.Handle(config, mux),
}