From f53767659fa6e690bac561756eabcfae551ac846 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Sun, 7 Mar 2021 12:21:51 -0500 Subject: [PATCH 1/2] README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1cd6b7f..b41686b 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ func main() { // Basic CORS // for more ideas, see: https://developer.github.com/v3/#cross-origin-resource-sharing r.Use(cors.Handler(cors.Options{ - // AllowedOrigins: []string{"https://foo.com"}, // Use this to allow specific origin hosts - AllowedOrigins: []string{"*"}, + // AllowedOrigins: []string{"https://foo.com"}, // Use this to allow specific origin hosts + AllowedOrigins: []string{"https://*", "http://*"}, // AllowOriginFunc: func(r *http.Request, origin string) bool { return true }, AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"}, From a4d81c9617ba8969be413c5c9a80c90577498a6e Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Thu, 25 Mar 2021 08:37:22 -0400 Subject: [PATCH 2/2] include go.mod file --- go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..26ddfc1 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/go-chi/cors + +go 1.14