{"id":17717757,"url":"https://github.com/mununki/go-cors","last_synced_at":"2025-08-15T23:09:25.848Z","repository":{"id":143922201,"uuid":"190244529","full_name":"mununki/go-cors","owner":"mununki","description":"A module to help to set up CORS for Go API or web Server","archived":false,"fork":false,"pushed_at":"2019-06-05T03:07:13.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T07:07:40.097Z","etag":null,"topics":["cors","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mununki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-04T16:58:09.000Z","updated_at":"2019-06-17T04:15:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"65ecec9d-e9b5-4f87-90d4-ccb3b8af9d83","html_url":"https://github.com/mununki/go-cors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mununki/go-cors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Fgo-cors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Fgo-cors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Fgo-cors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Fgo-cors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mununki","download_url":"https://codeload.github.com/mununki/go-cors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Fgo-cors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270644755,"owners_count":24621332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cors","go","golang"],"created_at":"2024-10-25T14:29:57.801Z","updated_at":"2025-08-15T23:09:25.824Z","avatar_url":"https://github.com/mununki.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-CORS\n\nThis is a module to handle CORS for Go web API or Web Server.\n\n## Usage\n\n```go\nmux.Handle(\"/\", goCors.Set(http.Handler))\n```\n\n\u003e NOTE : Be aware of setting CORS `*` for `dev` mode only, in case of `prod`, BE careful it will allow any requests from any origin.\n\n## Example\n\n```go\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\tgoCors \"github.com/mattdamon108/go-cors\"\n)\n\nfunc main() {\n\tmux := http.NewServeMux()\n\tmux.Handle(\"/\", goCors.Set(Index{}))\n\n\ts := \u0026http.Server{\n\t\tAddr:    \":8080\",\n\t\tHandler: mux,\n\t}\n\n\tlog.Println(\"Listening to... port 8080\")\n\tif err := s.ListenAndServe(); err != nil {\n\t\tpanic(err)\n\t}\n}\n\ntype Index struct{}\n\nfunc (i Index) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tpath := \"This is CORS test on path: \" + r.URL.Path\n\tw.Write([]byte(path))\n}\n```\n\n# Next to do\n\n- [ ] Add the whitelist\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmununki%2Fgo-cors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmununki%2Fgo-cors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmununki%2Fgo-cors/lists"}