Repository navigation
fix: disable Atmosphere CORS headers on push requests (#26215) (CP: 24.9) - #26290
Merged
Merged
Conversation
Fixes #26214 **Review risk:** two-way door. It affects only push requests that carry an `Origin` header, and the old behavior comes back with one servlet init parameter. **security** · flow-server · every app using `@Push` **Background: Atmosphere CORS.** Atmosphere installs a `CorsInterceptor` by default. For non-WebSocket requests it copies the request's `Origin` into `Access-Control-Allow-Origin`, sets `Access-Control-Allow-Credentials: true` and answers `OPTIONS` preflights itself. Push requests no longer send CORS headers. Before this change, any origin was echoed back with credentials allowed. **Risks:** - Behavior change: cross-origin embedding that uses push over the long-polling fallback now has to answer push `OPTIONS` preflights in its own CORS filter, or opt back in with the servlet init parameter `org.atmosphere.cpr.dropAccessControlAllowOriginHeader=false`. WebSocket push is not affected. - ✅ No API changes, no migration, no persisted state **Context.** The 2015 change meant to disable these headers (vaadin/framework#6109), but it set the parameter to `false`. That is Atmosphere's default, so the interceptor stayed on. - Set `DROP_ACCESS_CONTROL_ALLOW_ORIGIN_HEADER` to `true` in `PushRequestHandler.initAtmosphere`. --------- Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com> Co-authored-by: Artur Signell <artur@vaadin.com> Co-authored-by: mikhail <mikhail@vaadin.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
vaadin-review-bot
approved these changes
Oct 9, 2026
Collaborator
Author
|
This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR[Message is sent from bot] |
vaadin-bot
enabled auto-merge (squash)
October 9, 2026 11:22
vaadin-review-bot
approved these changes
Oct 9, 2026
Collaborator
Author
|
This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot] |
Contributor
Collaborator
Author
|
This ticket/PR has been released with Vaadin 24.9.24. |
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.
This PR cherry-picks changes from the original PR #26215 to branch 24.9.