GH-10988: Align HTTP Cross-Origin with Spring MVC#11003
Conversation
Fixes: spring-projects#10988 The Spring MVC comes with `allowedOrigins` as empty list and `allowCredentials` as `false` by default. In addition, Spring MVC provides now a flexible `allowedOriginPatterns` * Fix HTTP and WebFlux module to handle the required by Spring MVC defaults for `CrossOrigin` configuration **Auto-cherry-pick to `7.0.x` & `6.5.x`**
cppwfs
left a comment
There was a problem hiding this comment.
Looks great!
Just a question and a small doc hiccup.
| The default value is `pass:[*]`. | ||
| The default value is empty. | ||
| * `origin-patterns`: List of allowed origin patterns. | ||
| Alternative list to `origin` that supports more flexible |
There was a problem hiding this comment.
132 and 133 can be on the same line.
There was a problem hiding this comment.
Yeah... Copy/paste artifact from Javadocs :shame_on_me:
|
|
||
| Starting with version 4.2, you can configure the `<http:inbound-channel-adapter>` and `<http:inbound-gateway>` with a `<cross-origin>` element. | ||
| It represents the same options as Spring MVC's `@CrossOrigin` for `@Controller` annotations and allows the configuration of cross-origin resource sharing (CORS) for Spring Integration HTTP endpoints: | ||
| It represents the same options as Spring MVC `@CrossOrigin` for `@Controller` annotations and allows the configuration of cross-origin resource sharing (CORS) for Spring Integration HTTP endpoints: |
There was a problem hiding this comment.
Do we need to add this to the What's new doc as well, since this is a breaking change?
There was a problem hiding this comment.
No, we do not.
This is going to be back-ported down to 6.5.x.
And this is essentially a fix for already not working code.
To make it working you have to change those defaults.
Therefore everyone who uses this feature already covered, otherwise it would fail for them with those defaults rejected by clients.
There was a problem hiding this comment.
Makes sense. Just had to ask the question.
* GH-10988: Align HTTP Cross-Origin with Spring MVC Fixes: #10988 The Spring MVC comes with `allowedOrigins` as empty list and `allowCredentials` as `false` by default. In addition, Spring MVC provides now a flexible `allowedOriginPatterns` * Fix HTTP and WebFlux module to handle the required by Spring MVC defaults for `CrossOrigin` configuration * Fix `http/namespace.adoc` for `One Sentence per Line` (cherry picked from commit d8e2c89)
* GH-10988: Align HTTP Cross-Origin with Spring MVC Fixes: #10988 The Spring MVC comes with `allowedOrigins` as empty list and `allowCredentials` as `false` by default. In addition, Spring MVC provides now a flexible `allowedOriginPatterns` * Fix HTTP and WebFlux module to handle the required by Spring MVC defaults for `CrossOrigin` configuration * Fix `http/namespace.adoc` for `One Sentence per Line` (cherry picked from commit d8e2c89)
Fixes: #10988
The Spring MVC comes with
allowedOriginsas empty list andallowCredentialsasfalseby default.In addition, Spring MVC provides now a flexible
allowedOriginPatternsCrossOriginconfigurationAuto-cherry-pick to
7.0.x&6.5.x