mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 14:57:54 -05:00
* fix(apigateway): route CORS preflight (OPTIONS) to deployed API integrations Browsers send an OPTIONS preflight before a cross-origin call to a deployed API. GlobalCorsFilter short-circuited every OPTIONS preflight with Floci's own CORS response, so the request never reached the API Gateway integration — a Lambda (or a configured OPTIONS method) that handles CORS itself never ran. The deployed-API execute controllers also had no OPTIONS handler. - Skip GlobalCorsFilter for deployed-API paths (execute-api, _aws/execute-api, and the _user_request_ form) on both the request and response sides, so the integration owns CORS — matching the filter's documented "integrations keep precedence" contract. - Add @OPTIONS handlers to the three execute controllers, dispatching to the configured OPTIONS/ANY method like the other verbs. Adds unit tests for the deployed-API path matcher. Closes #1928 * test(apigateway): cover CORS preflight (OPTIONS) routing end-to-end Add ApiGatewayPreflightRoutingIntegrationTest driving a real browser preflight through the full chain: global CORS filter skip on deployed paths, route matching, OPTIONS/ANY method resolution, and integration invocation. A contrasting preflight to a management path (/restapis) asserts the filter still short-circuits non-deployed paths, so the deployed-path cases run with CORS genuinely enabled. * fix(apigatewayv2): preserve configured CORS preflight