Tags: gin-contrib/cors
Tags
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>
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>
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>
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>
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>
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>
PreviousNext