fix(apigatewayv2): fix route priority, proxy errors, CORS, and dispatch#275
Merged
vieiralucas merged 2 commits intomainfrom Apr 12, 2026
Merged
fix(apigatewayv2): fix route priority, proxy errors, CORS, and dispatch#275vieiralucas merged 2 commits intomainfrom
vieiralucas merged 2 commits intomainfrom
Conversation
…y errors, CORS, dispatch - Router: de-prioritize ANY routes vs exact-method routes for same path - Execute API: sort by API ID for deterministic stage resolution across APIs - Lambda proxy: return 502 on malformed statusCode instead of defaulting to 200 - Lambda proxy: return 502 on invalid base64 body instead of silently falling back - CreateStage: reject duplicate stage names with ConflictException - Dispatch: require /v2/apis/* (not just /v2/*) for management API routing - CORS: replace .parse().unwrap() with .parse().ok() to prevent panics - CORS preflight: reflect matching request origin instead of always first configured - HTTP proxy: clamp negative timeout before i64→u64 cast - Extract record_request helper to enable recording failed requests
d3b2996 to
69e37d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Addresses unresolved Cubic findings from PRs #252, #253, #254, #255, #256.
Test plan
cargo clippy -p fakecloud-apigatewayv2 -- -D warningspassestest_exact_method_over_any)Summary by cubic
Fixes API Gateway v2 routing, CORS, and proxy error handling to prevent silent defaults and panics. Stage resolution is now deterministic and management API dispatch is stricter.
Bug Fixes
Refactors
Written for commit 69e37d4. Summary will update on new commits.