Skip to content

Tags: gin-contrib/cors

Tags

v1.7.6

Toggle v1.7.6's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
refactor: refactor tests to table-driven style and simplify router logic

- Refactor tests to use table-driven style, reducing repetition and increasing maintainability
- Consolidate similar assertion patterns into loops and test tables for better scalability
- Replace multiple standalone test cases with grouped, parameterized subtests
- Simplify router handler definitions to single-line functions
- Update assertions to use the expected, actual parameter order for clarity
- Replace repeated origin validation checks with comprehensive test sets using maps of origins to expected results
- Refactor control flow using switch statements for clarity in testing multi-group router logic
- Minor code cleanup, such as variable renaming and removing redundant comments

Signed-off-by: appleboy <appleboy.tw@gmail.com>

v1.7.5

Toggle v1.7.5's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
ci: switch to internal API for completions and update dependencies

- Update Codecov action from v4 to v5

Signed-off-by: appleboy <appleboy.tw@gmail.com>

v1.7.4

Toggle v1.7.4's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
chore: update Go version and dependencies in project configuration

- Remove support for Go versions 1.21 and 1.22 in GitHub Actions workflow
- Update Go version in go.mod from 1.21.0 to 1.23.0
- Update indirect dependencies in go.mod to newer versions

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

v1.7.3

Toggle v1.7.3's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
chore: update dependencies to latest versions

- Update `github.com/bytedance/sonic` to `v1.12.6`
- Update `github.com/bytedance/sonic/loader` to `v0.2.1`
- Update `github.com/gabriel-vasile/mimetype` to `v1.4.7`
- Update `github.com/go-playground/validator/v10` to `v10.23.0`
- Update `github.com/goccy/go-json` to `v0.10.4`
- Update `github.com/klauspost/cpuid/v2` to `v2.2.9`
- Update `golang.org/x/arch` to `v0.12.0`
- Update `golang.org/x/crypto` to `v0.31.0`
- Update `golang.org/x/net` to `v0.33.0`
- Update `golang.org/x/sys` to `v0.28.0`
- Update `golang.org/x/text` to `v0.21.0`
- Update `google.golang.org/protobuf` to `v1.36.1`

Signed-off-by: appleboy <appleboy.tw@gmail.com>

v1.7.2

Toggle v1.7.2's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
ci: update Go workflow linting action to v5

- Update the golangci-lint action version from `v4` to `v5` in the GitHub workflow for Go.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

v1.7.1

Toggle v1.7.1's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
chore: update third-party dependencies to latest versions

- Update the version of `github.com/stretchr/testify` from `v1.8.4` to `v1.9.0`
- Update the version of `github.com/bytedance/sonic` from `v1.11.2` to `v1.11.3`
- Update the version of `github.com/pelletier/go-toml/v2` from `v2.1.1` to `v2.2.0`

Signed-off-by: appleboy <appleboy.tw@gmail.com>

v1.7.0

Toggle v1.7.0's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
refactor: refactor request handling and improve CORS checks

- Refactor `performRequestWithHeaders` function signature for better readability
- Standardize the string comparison order in CORS origin checks

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

v1.6.0

Toggle v1.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
test(cors): enhance CORS wildcard handling tests (#145)

- Import the `reflect` package in `cors_test.go`
- Add new test cases for parsing wildcard rules in CORS configuration
- Implement tests to check for panic on multiple wildcards and validate expected results for various wildcard scenarios

ref: #106

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

v1.5.0

Toggle v1.5.0's commit message

Verified

This commit was signed with the committer’s verified signature.
appleboy Bo-Yi Wu
docs: update documentation with additional notes

- Fix a typo in the README.md file
- Add a note about the difference between Default() and DefaultConfig() functions
- Add a note about the implications of using all origins in Gin

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

v1.4.0

Toggle v1.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #104 from gin-contrib/dependabot/go_modules/github…

….com/stretchr/testify-1.8.0

chore(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0