All work
- Add CORS support for REST API.FLANGE-43Garret Wilson
- Option for authenticating via CLI.FLANGE-42Garret Wilson
- Make setting up VPC optional in AWS Flange environment.FLANGE-41Garret Wilson
- Flange environment CloudFormation tags.FLANGE-40Garret Wilson
- Flange environment staging bucket name uniqueness.FLANGE-39Garret Wilson
- Option for deploying Cognito user pool to Flange Cloud environment.FLANGE-38Resolved issue: FLANGE-38Garret Wilson
- Authorization annotation for REST APIs.FLANGE-37Garret Wilson
- Enable API Gateway authorizer for indicated resources.FLANGE-36Garret Wilson
- Authentication and authorization for REST API.FLANGE-35Garret Wilson
- Improve Roman numerals class.JAVA-380Garret Wilson
- Deprecate `EmptyInputStream`.JAVA-379Garret Wilson
- REST API request body entity support.FLANGE-34Resolved issue: FLANGE-34Garret Wilson
- Refine marshalling of enums.FLANGE-33Garret Wilson
- Enable AWS Lambda logging for REST APIs.FLANGE-32Garret Wilson
- Ability to set Flange cloud log level.FLANGE-31Garret Wilson
- Marshal enums using lowercase `kebab-case` form.FLANGE-30Resolved issue: FLANGE-30Garret Wilson
- REST API query parameter support.FLANGE-29Resolved issue: FLANGE-29Garret Wilson
- Provide visibility of deployed cloud resource settings.FLANGE-28Resolved issue: FLANGE-28Garret Wilson
- Deal with Maven project artifact IDs with underscores.FLANGE-27Garret Wilson
- Verify correct serialization of `BigDecimal`.FLANGE-26Garret Wilson
- Support for RESTful API `404` result using `Optional`.FLANGE-25Resolved issue: FLANGE-25Garret Wilson
- Remove JSR 305 annotation from Flange examples.FLANGE-24Garret Wilson
- REST API exampleFLANGE-23Resolved issue: FLANGE-23Garret Wilson
- Support deploying services as a RESTful API in the cloud.FLANGE-22Resolved issue: FLANGE-22Garret Wilson
- REST API path parameter support.FLANGE-21Resolved issue: FLANGE-21Garret Wilson
- Lazy supplier.JAVA-378Garret Wilson
- Correct annotation processing retrieval methods to handle inheritance.JAVA-377Garret Wilson
- Update to Java 21.FLANGE-20Resolved issue: FLANGE-20Garret Wilson
- REST API HTTP method designations using Jakarta annotations.FLANGE-19Resolved issue: FLANGE-19Garret Wilson
- Update to Java 21.JAVA-376Garret Wilson
- Method to normalize URI encoding hex case for character sequences.JAVA-375Resolved issue: JAVA-375Garret Wilson
- Add Mockito as an agent to build.JAVA-374Resolved issue: JAVA-374Garret Wilson
- Update dependencies for 2025.JAVA-373Resolved issue: JAVA-373Garret Wilson
- Modern accessors for class element lookup.JAVA-372Resolved issue: JAVA-372Garret Wilson
- Abstraction layer for annotated elements and annotation mirrors.JAVA-371Resolved issue: JAVA-371Garret Wilson
- Factor out common "service" project and package.FLANGE-18Resolved issue: FLANGE-18Garret Wilson
- REST API path designations using Jakarta `@Path`.FLANGE-17Resolved issue: FLANGE-17Garret Wilson
- Support resource-related annotations in Jakarta Web Services (JAX-RS) 4.FLANGE-16Garret Wilson
- Remove `SubList` classes.JAVA-370Resolved issue: JAVA-370Garret Wilson
- Local REST API server.FLANGE-15Resolved issue: FLANGE-15Garret Wilson
- Utility method to test each character of a `CharSequence`.JAVA-369Resolved issue: JAVA-369Garret Wilson
- Support for distinct REST and cloud function API interfaces for the same cloud function service.FLANGE-14Garret Wilson
- `Optional.or(…)` for `Optional` instanceJAVA-368Resolved issue: JAVA-368Garret Wilson
- Revamp reverse map classes to `BiMap`.JAVA-367Garret Wilson
- REST API gateway generation and handling.FLANGE-13Resolved issue: FLANGE-13Garret Wilson
- Tidy up code for Java 21.FLANGE-12Resolved issue: FLANGE-12Garret Wilson
- Update core library to use `Optional<T>` where appropriate`JAVA-366Garret Wilson
- Deprecate `Filter<T>`.JAVA-365Resolved issue: JAVA-365Garret Wilson
- Factor `FilterIterator<E>` out of `CountedFilterIterator<E>`.JAVA-364Garret Wilson
- Remove `MappedList` classes.JAVA-363Resolved issue: JAVA-363Garret Wilson
50 of 851
Add CORS support for REST API.
Description
Environment
None
Details
Details
Assignee
Garret Wilson
Garret WilsonReporter
Garret Wilson
Garret WilsonComponents
Fix versions
Priority
Created 15 hours ago
Updated 42 minutes ago
The deployed REST API needs to support CORS so it can be accessed from
localhost
in the browser. (Testing from non-browser clients such as the VSCode REST Client extension ignores/bypasses CORS. See generally https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS .This will have two parts:
The Cognito authorizer will need to send back the correct origin allowed domain(s) CORS header(s) in any
401
or similar responses or similar if the request doesn’t contain authorization information; otherwise a browser will keep the code that made the request from seeing the response. See my question https://stackoverflow.com/q/79614609 . The solution is probably in the comments of https://github.com/serverless/serverless/issues/3896, namely configuring the API Gateway to allow all origins (i.e.*
) for4xx
and5xx
responses.The service Lambda code needs to be updated to add the appropriate CORS header(s) with responses. Ultimately this means Flange Cloud will need an elegant way to configure what domain it’s using and pass that domain to the Lambda in an environment variable. In the short term, detecting that a Flange dev profile is active and adding
localhost
as an allowed origin will probably suffice for this ticket.