Add support for standard CORS filter (Gateway API v1.4.0) and upgrade to Go 1.24 #156
+200
−176
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update to Gateway API v1.4.0 and Go 1.24
Summary
This PR updates the plugin to use Gateway API v1.4.0 and Go 1.24, which includes support for the standard CORS filter type in HTTPRoute.
Motivation
Gateway API v1.4.0 promotes CORS from experimental (
v1alpha2) to standard (v1). This update ensures the plugin can properly deserialize and handle HTTPRoute filters including the new standard CORS filter, without losing filter configuration during route manipulation.Previously, when using Gateway API v1.3.0, CORS filters defined in HTTPRoute were being deserialized as
{"type": "CORS"}without the actualcorsconfiguration block, causing validation errors when the plugin attempted to update routes.Changes
Dependencies
Code Changes
Dockerfile1.22.5to1.24pkg/plugin/grpcroute.gogatewayv1.HeaderMatchExact→gatewayv1.GRPCHeaderMatchExactgatewayv1.HeaderMatchRegularExpression→gatewayv1.GRPCHeaderMatchRegularExpressionThis change is required because Gateway API v1.4.0 introduced separate type constants for GRPC header matching (
GRPCHeaderMatchType) distinct from HTTP header matching (HeaderMatchType).Testing
Breaking Changes
Related Issues
corsfield was missing after HTTPRoute read operationsChecklist
go mod tidy