{"id":13793959,"url":"https://github.com/gin-contrib/cors","last_synced_at":"2026-04-02T16:19:07.070Z","repository":{"id":37749234,"uuid":"45836781","full_name":"gin-contrib/cors","owner":"gin-contrib","description":"Official CORS gin's middleware","archived":false,"fork":false,"pushed_at":"2026-03-08T09:13:18.000Z","size":222,"stargazers_count":1999,"open_issues_count":36,"forks_count":186,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-03-24T15:22:48.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gin-gonic.github.io/gin/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gin-contrib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-11-09T12:31:10.000Z","updated_at":"2026-03-23T17:11:29.000Z","dependencies_parsed_at":"2023-01-31T02:00:33.876Z","dependency_job_id":"86179d21-8ac4-452e-a9b9-e49f54981f8c","html_url":"https://github.com/gin-contrib/cors","commit_stats":{"total_commits":150,"total_committers":36,"mean_commits":4.166666666666667,"dds":0.4866666666666667,"last_synced_commit":"671e12a23c20f56a568435438b39e82e9637f46b"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/gin-contrib/cors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fcors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fcors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fcors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fcors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gin-contrib","download_url":"https://codeload.github.com/gin-contrib/cors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fcors/sbom","scorecard":{"id":427159,"data":{"date":"2025-08-11","repo":{"name":"github.com/gin-contrib/cors","commit":"c4b4ccff788f6a1ec0d796054d870f1a432b4193"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.2,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"13 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:29","Info: topLevel 'contents' permission set to 'read': .github/workflows/bearer.yml:8","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/goreleaser.yml:9","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bearer.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/bearer.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bearer.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/bearer.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bearer.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/bearer.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/goreleaser.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/goreleaser.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/cors/goreleaser.yml/master?enable=pin","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/goreleaser.yml:12"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":8,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 1 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T02:28:33.794Z","repository_id":37749234,"created_at":"2025-08-19T02:28:33.794Z","updated_at":"2025-08-19T02:28:33.794Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31309833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-08-03T23:00:33.936Z","updated_at":"2026-04-02T16:19:07.063Z","avatar_url":"https://github.com/gin-contrib.png","language":"Go","readme":"# gin-contrib/cors\n\n[![Run Tests](https://github.com/gin-contrib/cors/actions/workflows/go.yml/badge.svg)](https://github.com/gin-contrib/cors/actions/workflows/go.yml)\n[![Trivy Security Scan](https://github.com/gin-contrib/cors/actions/workflows/trivy-scan.yml/badge.svg)](https://github.com/gin-contrib/cors/actions/workflows/trivy-scan.yml)\n[![codecov](https://codecov.io/gh/gin-contrib/cors/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-contrib/cors)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gin-contrib/cors)](https://goreportcard.com/report/github.com/gin-contrib/cors)\n[![GoDoc](https://godoc.org/github.com/gin-contrib/cors?status.svg)](https://godoc.org/github.com/gin-contrib/cors)\n\n- [gin-contrib/cors](#gin-contribcors)\n  - [Overview](#overview)\n  - [Installation](#installation)\n  - [Quick Start](#quick-start)\n  - [Advanced Usage](#advanced-usage)\n    - [Custom Configuration](#custom-configuration)\n    - [DefaultConfig Reference](#defaultconfig-reference)\n    - [Default() Convenience](#default-convenience)\n  - [Configuration Reference](#configuration-reference)\n    - [Notes on Configuration](#notes-on-configuration)\n    - [Examples](#examples)\n      - [Advanced Options](#advanced-options)\n      - [Custom Origin Validation](#custom-origin-validation)\n      - [With Gin Context](#with-gin-context)\n  - [Helper Methods](#helper-methods)\n  - [Validation \\\u0026 Error Handling](#validation--error-handling)\n  - [Important Notes](#important-notes)\n\n---\n\n## Overview\n\n**CORS (Cross-Origin Resource Sharing)** middleware for [Gin](https://github.com/gin-gonic/gin).\n\n- Enables flexible CORS handling for your Gin-based APIs.\n- Highly configurable: origins, methods, headers, credentials, and more.\n\n---\n\n## Installation\n\n```sh\ngo get github.com/gin-contrib/cors\n```\n\nImport in your Go code:\n\n```go\nimport \"github.com/gin-contrib/cors\"\n```\n\n---\n\n## Quick Start\n\nAllow all origins (default):\n\n```go\nimport (\n  \"github.com/gin-contrib/cors\"\n  \"github.com/gin-gonic/gin\"\n)\n\nfunc main() {\n  router := gin.Default()\n  router.Use(cors.Default()) // All origins allowed by default\n  router.Run()\n}\n```\n\n\u003e ⚠️ **Warning:** Allowing all origins disables cookies for clients. For credentialed requests, **do not** allow all origins.\n\n---\n\n## Advanced Usage\n\n### Custom Configuration\n\nConfigure allowed origins, methods, headers, and more:\n\n```go\nimport (\n  \"time\"\n  \"github.com/gin-contrib/cors\"\n  \"github.com/gin-gonic/gin\"\n)\n\nfunc main() {\n  router := gin.Default()\n  router.Use(cors.New(cors.Config{\n    AllowOrigins:     []string{\"https://foo.com\"},\n    AllowMethods:     []string{\"PUT\", \"PATCH\"},\n    AllowHeaders:     []string{\"Origin\"},\n    ExposeHeaders:    []string{\"Content-Length\"},\n    AllowCredentials: true,\n    AllowOriginFunc: func(origin string) bool {\n      return origin == \"https://github.com\"\n    },\n    MaxAge: 12 * time.Hour,\n  }))\n  router.Run()\n}\n```\n\n---\n\n### DefaultConfig Reference\n\nStart with library defaults and customize as needed:\n\n```go\nimport (\n  \"github.com/gin-contrib/cors\"\n  \"github.com/gin-gonic/gin\"\n)\n\nfunc main() {\n  router := gin.Default()\n  config := cors.DefaultConfig()\n  config.AllowOrigins = []string{\"http://google.com\"}\n  // config.AllowOrigins = []string{\"http://google.com\", \"http://facebook.com\"}\n  // config.AllowAllOrigins = true\n\n  router.Use(cors.New(config))\n  router.Run()\n}\n```\n\n\u003e **Note:** `Default()` allows all origins, but `DefaultConfig()` does **not**. To allow all origins, set `AllowAllOrigins = true`.\n\n---\n\n### Default() Convenience\n\nEnable all origins with a single call:\n\n```go\nrouter.Use(cors.Default()) // Equivalent to AllowAllOrigins = true\n```\n\n---\n\n## Configuration Reference\n\nThe middleware is controlled via the `cors.Config` struct. All fields are optional unless otherwise stated.\n\n| Field                         | Type                        | Default                                                   | Description                                                                                   |\n|-------------------------------|-----------------------------|-----------------------------------------------------------|-----------------------------------------------------------------------------------------------|\n| `AllowAllOrigins`             | `bool`                      | `false`                                                   | If true, allows all origins. Credentials **cannot** be used.                                  |\n| `AllowOrigins`                | `[]string`                  | `[]`                                                      | List of allowed origins. Supports exact match, `*`, and wildcards.                            |\n| `AllowOriginFunc`             | `func(string) bool`         | `nil`                                                     | Custom function to validate origin. If set, `AllowOrigins` is ignored.                        |\n| `AllowOriginWithContextFunc`  | `func(*gin.Context,string)bool` | `nil`                                               | Like `AllowOriginFunc`, but with request context.                                             |\n| `AllowMethods`                | `[]string`                  | `[]string{\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", \"HEAD\", \"OPTIONS\"}` | Allowed HTTP methods.                                   |\n| `AllowPrivateNetwork`         | `bool`                      | `false`                                                   | Adds [Private Network Access](https://wicg.github.io/private-network-access/) CORS header.    |\n| `AllowHeaders`                | `[]string`                  | `[]`                                                      | List of non-simple headers permitted in requests.                                             |\n| `AllowCredentials`            | `bool`                      | `false`                                                   | Allow cookies, HTTP auth, or client certs. Only if precise origins are used.                  |\n| `ExposeHeaders`               | `[]string`                  | `[]`                                                      | Headers exposed to the browser.                                                               |\n| `MaxAge`                      | `time.Duration`             | `12 * time.Hour`                                          | Cache time for preflight requests.                                                            |\n| `AllowWildcard`               | `bool`                      | `false`                                                   | Enables wildcards in origins (e.g. `https://*.example.com`).                                  |\n| `AllowBrowserExtensions`      | `bool`                      | `false`                                                   | Allow browser extension schemes as origins (e.g. `chrome-extension://`).                      |\n| `CustomSchemas`               | `[]string`                  | `nil`                                                     | Additional allowed URI schemes (e.g. `tauri://`).                                             |\n| `AllowWebSockets`             | `bool`                      | `false`                                                   | Allow `ws://` and `wss://` schemas.                                                           |\n| `AllowFiles`                  | `bool`                      | `false`                                                   | Allow `file://` origins (dangerous; use only if necessary).                                   |\n| `OptionsResponseStatusCode`   | `int`                       | `204`                                                     | Custom status code for `OPTIONS` responses.                                                   |\n\n---\n\n### Notes on Configuration\n\n- Only one of `AllowAllOrigins`, `AllowOrigins`, `AllowOriginFunc`, or `AllowOriginWithContextFunc` should be set.\n- If `AllowAllOrigins` is true, other origin settings are ignored and credentialed requests are not allowed.\n- If `AllowWildcard` is enabled, only one `*` is allowed per origin string.\n- Use `AllowBrowserExtensions`, `AllowWebSockets`, or `AllowFiles` to permit non-HTTP(s) protocols as origins.\n- Custom schemas allow, for example, usage in desktop apps via custom URI schemes (`tauri://`, etc.).\n- If both `AllowOriginFunc` and `AllowOriginWithContextFunc` are set, the context-specific function is preferred.\n\n---\n\n### Examples\n\n#### Advanced Options\n\n```go\nconfig := cors.Config{\n  AllowOrigins:           []string{\"https://*.foo.com\", \"https://bar.com\"},\n  AllowWildcard:          true,\n  AllowMethods:           []string{\"GET\", \"POST\"},\n  AllowHeaders:           []string{\"Authorization\", \"Content-Type\"},\n  AllowCredentials:       true,\n  AllowBrowserExtensions: true,\n  AllowWebSockets:        true,\n  AllowFiles:             false,\n  CustomSchemas:          []string{\"tauri://\"},\n  MaxAge:                 24 * time.Hour,\n  ExposeHeaders:          []string{\"X-Custom-Header\"},\n  AllowPrivateNetwork:    true,\n}\n```\n\n#### Custom Origin Validation\n\n```go\nconfig := cors.Config{\n  AllowOriginFunc: func(origin string) bool {\n    // Allow any github.com subdomain or a custom rule\n    return strings.HasSuffix(origin, \"github.com\")\n  },\n}\n```\n\n#### With Gin Context\n\n```go\nconfig := cors.Config{\n  AllowOriginWithContextFunc: func(c *gin.Context, origin string) bool {\n    // Allow only if a certain header is present\n    return c.Request.Header.Get(\"X-Allow-CORS\") == \"yes\"\n  },\n}\n```\n\n---\n\n## Helper Methods\n\nDynamically add methods or headers to the config:\n\n```go\nconfig.AddAllowMethods(\"DELETE\", \"OPTIONS\")\nconfig.AddAllowHeaders(\"X-My-Header\")\nconfig.AddExposeHeaders(\"X-Other-Header\")\n```\n\n---\n\n## Validation \u0026 Error Handling\n\n- Calling `Validate()` on a `Config` checks for misconfiguration (called internally).\n- If `AllowAllOrigins` is set, you cannot also set `AllowOrigins` or any `AllowOriginFunc`.\n- If neither `AllowAllOrigins`, `AllowOriginFunc`, nor `AllowOrigins` is set, an error is raised.\n- If an `AllowOrigin` contains a wildcard but `AllowWildcard` is not enabled, or more than one `*` is present, a panic is triggered.\n- Invalid origin schemas or unsupported wildcards are rejected.\n\n---\n\n## Important Notes\n\n- **Enabling all origins disables cookies:** When `AllowAllOrigins` is enabled, Gin cannot set cookies for clients. If you need credential sharing (cookies, authentication headers), **do not** allow all origins.\n- For detailed documentation and configuration options, see the [GoDoc](https://godoc.org/github.com/gin-contrib/cors).\n","funding_links":[],"categories":["Middlewares","Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgin-contrib%2Fcors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgin-contrib%2Fcors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgin-contrib%2Fcors/lists"}