Skip to content

CORS updated and declarative CORS#11155

Open
tomas-langer wants to merge 7 commits intohelidon-io:mainfrom
tomas-langer:7631-cors-updates
Open

CORS updated and declarative CORS#11155
tomas-langer wants to merge 7 commits intohelidon-io:mainfrom
tomas-langer:7631-cors-updates

Conversation

@tomas-langer
Copy link
Member

@tomas-langer tomas-langer commented Feb 13, 2026

Description

Resolves #7631
Resolves #10726

Documentation

This PR deprecates existing CORS support (and the cors module).

The new approach:

  • a single enforcement of CORS from a single server feature
  • configurable (backward compatible with current version)
  • additional CORS Path configurations can be added to service registry, or manually configured when setting up the CorsFeature

Existing APIs are mostly deprecated, the CorsPathConfig replaces CrossOriginConfig (as it is based on builder API).

There is one change that should not have impact on function - we now return 204 as the "normal" response from pre-flight checks (204 is "No-Content"), as opposed to original 200 ("OK"), as 204 is a better fit.
This breaks test in examples, that I will fix together with Declarative CORS example.

Documentation updated (may require a bit more work).
Archetypes are broken, investigating (I want to remove deprecated stuff)

@tomas-langer tomas-langer self-assigned this Feb 13, 2026
@tomas-langer tomas-langer added the cors Related to CORS support label Feb 13, 2026
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cors Related to CORS support OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declarative CORS Decoupled CORS supports

1 participant